Skip to content

Commit 8152fb6

Browse files
ESLint: move custom rule into CLI argument (#2458)
AFAIK, the are no way to specify `rulesdir` inside '.eslintrc' config because of that IDE can't run ESLint with default CLI options
1 parent ce5eb6c commit 8152fb6

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

.eslintrc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ plugins:
1010
- import
1111

1212
rules:
13-
no-dir-import: error
14-
1513
##############################################################################
1614
# `eslint-plugin-flowtype` rule list based on `v4.6.x`
1715
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"test:ci": "yarn check --integrity && npm run prettier:check && npm run lint -- --no-cache && npm run check && npm run testonly:cover && npm run check:ts && npm run check:spelling && npm run build",
2929
"testonly": "mocha --full-trace src/**/__tests__/**/*-test.js",
3030
"testonly:cover": "nyc npm run testonly",
31-
"lint": "eslint --rulesdir './resources/eslint-rules' --cache --ext .js,.ts src resources",
31+
"lint": "eslint --rulesdir './resources/eslint-rules' --rule 'no-dir-import: error' --cache --ext .js,.ts src resources",
3232
"benchmark": "node --noconcurrent_sweeping --expose-gc --predictable ./resources/benchmark.js",
3333
"prettier": "prettier --ignore-path .gitignore --write --list-different \"**/*.{js,ts,md,json,yml}\"",
3434
"prettier:check": "prettier --ignore-path .gitignore --check \"**/*.{js,ts,md,json,yml}\"",

0 commit comments

Comments
 (0)