Skip to content

Commit

Permalink
lib: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Jul 7, 2017
1 parent 0ac4bf4 commit c0dffb4
Show file tree
Hide file tree
Showing 6 changed files with 623 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,41 @@
module.exports = {
'env': {
'browser': false,
'commonjs': true,
'node': true,
'es6': true
},
'parserOptions': {
'ecmaVersion': 8
},
'extends': 'eslint:recommended',
'rules': {
'indent': [
'error',
2,
{
'FunctionDeclaration': {
'parameters': 'first'
},
'FunctionExpression': {
'parameters': 'first'
},
'CallExpression': {
'arguments': 'first'
}
}
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
]
}
};
6 changes: 0 additions & 6 deletions lib/shake/plugin.js
Expand Up @@ -33,8 +33,6 @@ module.exports = ShakePlugin;

ShakePlugin.prototype.apply = function apply(compiler) {

This comment has been minimized.

Copy link
@david884

david884 Dec 1, 2018

compiler.plugin('compilation', (compilation, params) => {
const imports = new Map();

const state = new State();

params.normalModuleFactory.plugin('parser', (parser, parserOptions) => {
Expand All @@ -60,10 +58,6 @@ ShakePlugin.prototype.apply = function apply(compiler) {
this.options.onGlobalBailout(state.analyzer.bailouts);

state.analyzer.bailouts.forEach((bailout) => {
const loc = `${bailout.source}:` +
`${bailout.loc.start.line}:${bailout.loc.start.column}`;
const reason = `${bailout.reason} at [${loc}]`;

compilation.warnings.push(new GlobalBailout(bailout));
});

Expand Down
2 changes: 0 additions & 2 deletions lib/shake/replacement.js
Expand Up @@ -3,8 +3,6 @@
const assert = require('assert');
const acorn = require('acorn');
const WebpackModule = require('webpack/lib/Module');
const CommonJsRequireDependency =
require('webpack/lib/dependencies/CommonJsRequireDependency');
const RawSource = require('webpack-sources').RawSource;

const shake = require('common-shake');
Expand Down

0 comments on commit c0dffb4

Please sign in to comment.