]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix linter issue on webpack config files
authorJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 20 Jun 2017 05:14:04 +0000 (07:14 +0200)
committerThomas Citharel <tcit@tcit.fr>
Thu, 22 Jun 2017 10:13:22 +0000 (12:13 +0200)
app/config/webpack/common.js
app/config/webpack/dev.js
app/config/webpack/prod.js

index 4f5739f01b11a9d8ad72b4a9579a2c0de21d9e5d..1ef193c7f468ab8a2b1d1c21de2937b6117211e7 100644 (file)
@@ -4,13 +4,12 @@ const StyleLintPlugin = require('stylelint-webpack-plugin');
 
 const rootDir = path.resolve(__dirname, '../../../');
 
-module.exports = function() {
+module.exports = function () {
   return {
     entry: {
       material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
       baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'),
     },
-
     output: {
       filename: '[name].js',
       path: path.resolve(rootDir, 'web/bundles/wallabagcore'),
@@ -21,7 +20,7 @@ module.exports = function() {
         $: 'jquery',
         jQuery: 'jquery',
         'window.$': 'jquery',
-        'window.jQuery': 'jquery'
+        'window.jQuery': 'jquery',
       }),
       new StyleLintPlugin({
         configFile: '.stylelintrc',
@@ -33,8 +32,8 @@ module.exports = function() {
     ],
     resolve: {
       alias: {
-        jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js')
-      }
+        jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'),
+      },
     },
   };
 };
index 771df65bda463111cdf70b618cb0ffae6a5a3641..b655115298e399141741e910d68a4a67a1f5a88e 100644 (file)
@@ -1,13 +1,12 @@
 const webpackMerge = require('webpack-merge');
 const webpack = require('webpack');
-const path = require('path');
 const commonConfig = require('./common.js');
 
 module.exports = function () {
   return webpackMerge(commonConfig(), {
     devtool: 'eval-source-map',
     output: {
-      filename: '[name].dev.js'
+      filename: '[name].dev.js',
     },
 
     devServer: {
@@ -34,9 +33,9 @@ module.exports = function () {
           use: {
             loader: 'babel-loader',
             options: {
-              presets: ['env']
-            }
-          }
+              presets: ['env'],
+            },
+          },
         },
         {
           test: /\.(s)?css$/,
@@ -46,17 +45,17 @@ module.exports = function () {
               loader: 'css-loader',
               options: {
                 importLoaders: 1,
-              }
+              },
             },
-          'postcss-loader',
-          'sass-loader'
-          ]
+            'postcss-loader',
+            'sass-loader',
+          ],
         },
         {
           test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/,
-          use: 'url-loader'
+          use: 'url-loader',
         },
-      ]
+      ],
     },
-  })
+  });
 };
index ef41ab990c16d32586722434001c983f8a78a2de..44961cc581a463e64304fb06877e04200179b19f 100644 (file)
@@ -5,34 +5,34 @@ const ManifestPlugin = require('webpack-manifest-plugin');
 
 const commonConfig = require('./common.js');
 
-module.exports = function() {
+module.exports = function () {
   return webpackMerge(commonConfig(), {
     output: {
-      filename: '[name].js'
+      filename: '[name].js',
     },
     devtool: 'source-map',
     plugins: [
       new webpack.DefinePlugin({
         'process.env': {
-          'NODE_ENV': JSON.stringify('production')
-        }
+          'NODE_ENV': JSON.stringify('production'),
+        },
       }),
       new webpack.optimize.UglifyJsPlugin({
         beautify: false,
         mangle: {
           screw_ie8: true,
-          keep_fnames: true
+          keep_fnames: true,
         },
         compress: {
           screw_ie8: true,
-          warnings: false
+          warnings: false,
         },
-        comments: false
+        comments: false,
       }),
       new ExtractTextPlugin('[name].css'),
       new ManifestPlugin({
         fileName: 'manifest.json',
-      })
+      }),
     ],
     module: {
       rules: [
@@ -48,9 +48,9 @@ module.exports = function() {
           use: {
             loader: 'babel-loader',
             options: {
-              presets: ['env']
-            }
-          }
+              presets: ['env'],
+            },
+          },
         },
         {
           test: /\.(s)?css$/,
@@ -63,17 +63,17 @@ module.exports = function() {
                   importLoaders: 1,
                   minimize: {
                     discardComments: {
-                      removeAll: true
+                      removeAll: true,
                     },
                     core: true,
-                    minifyFontValues: true
-                  }
-                }
+                    minifyFontValues: true,
+                  },
+                },
               },
               'postcss-loader',
-              'sass-loader'
-            ]
-          })
+              'sass-loader',
+            ],
+          }),
         },
         {
           test: /\.(jpg|png|gif|svg)$/,
@@ -81,8 +81,8 @@ module.exports = function() {
             loader: 'file-loader',
             options: {
               name: 'img/[name].[ext]',
-            }
-          }
+            },
+          },
         },
         {
           test: /\.(eot|ttf|woff|woff2)$/,
@@ -90,10 +90,10 @@ module.exports = function() {
             loader: 'file-loader',
             options: {
               name: 'fonts/[name].[ext]',
-            }
-          }
-        }
-      ]
+            },
+          },
+        },
+      ],
     },
-  })
+  });
 };