Skip to content

Commit

Permalink
move linter to build step
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Oct 23, 2017
1 parent 19afc80 commit 2449736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
16 changes: 1 addition & 15 deletions _develop/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ module.exports = function(env) {
},
module: {
rules: [{
test: /\.js$/,
use: ['eslint-loader'],
include: source,
enforce: 'pre'
}, {
test: /\.ts$/,
use: [{
loader: 'ts-loader',
Expand Down Expand Up @@ -139,13 +134,6 @@ module.exports = function(env) {
}
};

if (env && env.dev) {
config.module.rules = config.module.rules.slice(1); // Remove linter
config.module.rules[3].use[0].options = {
plugins: ['transform-es2015-modules-commonjs']
};
}

if (env && env.minimize) {
config.entry = {
'quill.min.js': './quill.js'
Expand All @@ -159,9 +147,7 @@ module.exports = function(env) {
}

if (env && env.coverage) {
config.module.rules[4].use[0].options = {
plugins: ['istanbul', 'transform-es2015-modules-commonjs']
};
config.module.rules[3].use[0].options.plugins = ['istanbul'];
}

return config;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"babel-preset-env": "^1.6.1",
"css-loader": "~0.28.7",
"eslint": "^4.9.0",
"eslint-loader": "^1.9.0",
"extract-text-webpack-plugin": "^3.0.1",
"highlight.js": "^9.12.0",
"html-loader": "~0.5.1",
Expand Down Expand Up @@ -79,8 +78,9 @@
"url": "https://github.com/quilljs/quill/issues"
},
"scripts": {
"build": "webpack --config _develop/webpack.config.js; rm dist/quill.core dist/quill.bubble dist/quill.snow;",
"build": "npm run lint && webpack --config _develop/webpack.config.js; rm dist/quill.core dist/quill.bubble dist/quill.snow;",
"build:release": "./_develop/scripts/release.sh",
"lint": "eslint blots core formats modules themes ui",
"start": "npm run build; bundle exec foreman start -f _develop/procfile",
"test": "npm run test:unit",
"test:all": "npm run test:unit; npm run test:functional",
Expand Down

0 comments on commit 2449736

Please sign in to comment.