Skip to content

Commit 3efdc54

Browse files
ESLint: use the --rulesdir option for internal rules. (#3849)
1 parent f201681 commit 3efdc54

File tree

6 files changed

+8
-28
lines changed

6 files changed

+8
-28
lines changed

.eslintrc.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ env:
55
shared-node-browser: true
66
reportUnusedDisableDirectives: true
77
plugins:
8-
- internal-rules
98
- node
109
- import
1110
- simple-import-sort
@@ -19,12 +18,11 @@ settings:
1918
rules:
2019
##############################################################################
2120
# Internal rules located in 'resources/eslint-internal-rules'.
22-
# See './resources/eslint-internal-rules/README.md'
2321
##############################################################################
2422

25-
internal-rules/only-ascii: error
26-
internal-rules/no-dir-import: error
27-
internal-rules/require-to-string-tag: off
23+
only-ascii: error
24+
no-dir-import: error
25+
require-to-string-tag: off
2826

2927
##############################################################################
3028
# `eslint-plugin-node` rule list based on `v11.1.x`
@@ -658,10 +656,10 @@ overrides:
658656
'@typescript-eslint/type-annotation-spacing': off
659657
- files: 'src/**'
660658
rules:
661-
internal-rules/require-to-string-tag: error
659+
require-to-string-tag: error
662660
- files: 'src/**/__*__/**'
663661
rules:
664-
internal-rules/require-to-string-tag: off
662+
require-to-string-tag: off
665663
node/no-unpublished-import: [error, { allowModules: ['chai', 'mocha'] }]
666664
import/no-deprecated: off
667665
import/no-restricted-paths: off
@@ -700,7 +698,7 @@ overrides:
700698
env:
701699
node: true
702700
rules:
703-
internal-rules/only-ascii: [error, { allowEmoji: true }]
701+
only-ascii: [error, { allowEmoji: true }]
704702
node/no-unpublished-import: off
705703
node/no-sync: off
706704
import/no-namespace: off

package-lock.json

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"changelog": "ts-node resources/gen-changelog.ts",
3636
"benchmark": "ts-node resources/benchmark.ts",
3737
"test": "npm run lint && npm run check && npm run testonly:cover && npm run prettier:check && npm run check:spelling && npm run check:integrations",
38-
"lint": "eslint --cache --max-warnings 0 .",
38+
"lint": "eslint --cache --max-warnings 0 --rulesdir resources/eslint-internal-rules/ .",
3939
"check": "tsc --pretty",
4040
"testonly": "mocha --full-trace src/**/__tests__/**/*-test.ts",
4141
"testonly:cover": "c8 npm run testonly",
@@ -75,7 +75,6 @@
7575
"docusaurus-plugin-typedoc-api": "2.5.0",
7676
"eslint": "8.27.0",
7777
"eslint-plugin-import": "2.26.0",
78-
"eslint-plugin-internal-rules": "file:./resources/eslint-internal-rules",
7978
"eslint-plugin-node": "11.1.0",
8079
"eslint-plugin-react": "7.31.10",
8180
"eslint-plugin-react-hooks": "4.6.0",

resources/build-docusaurus.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fs.writeFileSync(tmpDirPath('package.json'), JSON.stringify(packageJSON));
1414

1515
copyToTmpDir('package-lock.json');
1616
copyToTmpDir('tsconfig.json');
17-
copyToTmpDir('resources/eslint-internal-rules');
1817
copyToTmpDir('src');
1918
copyToTmpDir('website');
2019

resources/eslint-internal-rules/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

resources/eslint-internal-rules/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"name": "eslint-plugin-graphql-internal",
3-
"version": "0.0.0",
42
"private": true,
53
"engines": {
64
"node": ">= 14.0.0"

0 commit comments

Comments
 (0)