diff --git a/.huskyrc.js b/.huskyrc.js index 1cc6f85..2e1b2a7 100644 --- a/.huskyrc.js +++ b/.huskyrc.js @@ -1,6 +1,6 @@ module.exports = { hooks: { - 'pre-commit': 'lint-staged && npm run test', + 'pre-commit': 'lint-staged', 'commit-msg': 'npm run lint:commit', }, -} +}; diff --git a/babel/best-practices.js b/babel/best-practices.js index 6d1c42b..f8c06bc 100644 --- a/babel/best-practices.js +++ b/babel/best-practices.js @@ -1,4 +1,4 @@ -modules.exports = { +module.exports = { extends: ['./no-rules-config.js'], rules: { // Deprecated diff --git a/import/best-practices.js b/import/best-practices.js index 5960230..0a8359b 100644 --- a/import/best-practices.js +++ b/import/best-practices.js @@ -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', diff --git a/import/stylistic.js b/import/stylistic.js index a4a1eff..b80eefd 100644 --- a/import/stylistic.js +++ b/import/stylistic.js @@ -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', diff --git a/package.json b/package.json index 54bfd9c..059aa52 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -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",