Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca5836e

Browse files
committed
disable most eslint-plugin-eslint-plugin rules as they no longer are needed
1 parent ed6ed5e commit ca5836e

File tree

5 files changed

+17
-21
lines changed

5 files changed

+17
-21
lines changed

.eslintrc.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{
3131
"files": [
3232
"packages/eslint-plugin-tslint/tests/**/*.ts",
33-
"packages/eslint-plugin/tests/**/*.js",
33+
"packages/eslint-plugin/tests/**/*.test.ts",
3434
"packages/parser/tests/**/*.ts",
3535
"packages/typescript-estree/tests/**/*.ts"
3636
],
@@ -53,22 +53,9 @@
5353
}
5454
},
5555
{
56-
"files": ["packages/eslint-plugin/**/*.js"],
56+
"files": ["packages/eslint-plugin/test/**/*.ts"],
5757
"rules": {
58-
"eslint-plugin/fixer-return": "error",
59-
"eslint-plugin/no-identical-tests": "error",
60-
"eslint-plugin/no-missing-placeholders": "error",
61-
"eslint-plugin/no-unused-placeholders": "error",
62-
"eslint-plugin/no-useless-token-range": "error",
63-
"eslint-plugin/require-meta-fixable": "error",
64-
"eslint-plugin/prefer-placeholders": "error",
65-
"eslint-plugin/prefer-replace-text": "error",
66-
"eslint-plugin/no-deprecated-report-api": "error",
67-
"eslint-plugin/report-message-format": ["error", "^[A-Z'{].*[\\.}]$"],
68-
"eslint-plugin/no-deprecated-context-methods": "error",
69-
"eslint-plugin/prefer-output-null": "error",
70-
"eslint-plugin/test-case-shorthand-strings": "error",
71-
"eslint-plugin/require-meta-type": "error"
58+
"eslint-plugin/no-identical-tests": "error"
7259
}
7360
}
7461
]

packages/eslint-plugin/src/rules/array-type.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
* @author Armano <https://github.com/armano2>
55
*/
66

7-
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
7+
import {
8+
AST_NODE_TYPES,
9+
AST_TOKEN_TYPES,
10+
TSESTree
11+
} from '@typescript-eslint/typescript-estree';
812
import * as util from '../util';
913

1014
/**
@@ -124,7 +128,7 @@ export default util.createRule<Options, MessageIds>({
124128
return false;
125129
}
126130

127-
return prevToken.type === AST_NODE_TYPES.Identifier;
131+
return prevToken.type === AST_TOKEN_TYPES.Identifier;
128132
}
129133

130134
/**

packages/eslint-plugin/src/rules/prefer-namespace-keyword.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
* @author Armano <https://github.com/armano2>
55
*/
66

7-
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/typescript-estree';
7+
import {
8+
AST_NODE_TYPES,
9+
AST_TOKEN_TYPES,
10+
TSESTree
11+
} from '@typescript-eslint/typescript-estree';
812
import * as util from '../util';
913

1014
export default util.createRule({
@@ -40,7 +44,7 @@ export default util.createRule({
4044

4145
if (
4246
moduleType &&
43-
moduleType.type === AST_NODE_TYPES.Identifier &&
47+
moduleType.type === AST_TOKEN_TYPES.Identifier &&
4448
moduleType.value === 'module'
4549
) {
4650
context.report({

packages/eslint-plugin/src/util/createRule.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type CreateRuleMeta<TMessageIds extends string> = {
2424
} & RemoveProps<RuleMetaData<TMessageIds>, 'docs'>;
2525

2626
// This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349
27+
// TODO - when the above rule lands; add type checking for the context.report `data` property
2728
export function createRule<
2829
TOptions extends Readonly<any[]>,
2930
TMessageIds extends string,

packages/typescript-estree/src/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,6 @@ export function parseAndGenerateServices<
418418
};
419419
}
420420

421-
export { AST_NODE_TYPES } from './ast-node-types';
421+
export { AST_NODE_TYPES, AST_TOKEN_TYPES } from './ast-node-types';
422422
export { ParserOptions };
423423
export { TSESTree };

0 commit comments

Comments
 (0)