Skip to content

Commit

Permalink
fix: add unused import rules and fix typo in babel config (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbshl authored Jan 31, 2019
1 parent 07b0ae1 commit 0732b45
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
hooks: {
'pre-commit': 'lint-staged && npm run test',
'pre-commit': 'lint-staged',
'commit-msg': 'npm run lint:commit',
},
}
};
2 changes: 1 addition & 1 deletion babel/best-practices.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
modules.exports = {
module.exports = {
extends: ['./no-rules-config.js'],
rules: {
// Deprecated
Expand Down
1 change: 1 addition & 0 deletions import/best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
},
],
'import/no-mutable-exports': 'error',
'import/no-named-as-default-member': 'warn',
'import/no-restricted-paths': 'off',
'import/no-unassigned-import': 'off',
'import/no-webpack-loader-syntax': 'error',
Expand Down
1 change: 1 addition & 0 deletions import/stylistic.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'import/no-dynamic-require': 'off',
'import/no-nodejs-modules': 'off',
'import/no-named-default': 'error',
'import/no-named-export': 'warn',
'import/no-namespace': 'off',
'import/order': [
'warn',
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
"prefix": "npm run format",
"fix": "eslint --fix",
"format": "prettier --write '**/*.js'",
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
"test": ":",
"prepublishOnly": "npm run validate && safe-publish-latest",
"test": "npm run --silent find-new-rules && npm run --silent lint:js && npm run --silent lint:check",
"find-new-rules": "npm run find-new-rules:main",
"find-new-rules:main": "eslint-find-rules --unused ./index.js",
"validate": "npm test",
"cm": "npx git-cz",
"release": "npx standard-version"
},
Expand Down Expand Up @@ -63,7 +66,6 @@
"eslint": "5.12.0",
"eslint-find-rules": "^3.3.1",
"husky": "1.3.0",
"in-publish": "2.0.0",
"lint-staged": "8.1.1",
"markdownlint-cli": "0.13.0",
"prettier": "1.16.2",
Expand Down

0 comments on commit 0732b45

Please sign in to comment.