8000 feat: Move shared types into their own package (#425) · lcombs15/typescript-eslint@a7a03ce · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Commit a7a03ce

Browse files
authored
feat: Move shared types into their own package (typescript-eslint#425)
1 parent 6eb97d4 commit a7a03ce

File tree

130 files changed

+1729
-1313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1729
-1313
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ fixtures
55
shared-fixtures
66
coverage
77

8-
packages/typescript-estree/src/estree
98
packages/eslint-plugin-tslint/tests

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"no-dupe-class-members": "off",
1313
"no-mixed-operators": "error",
1414
"no-console": "off",
15+
"no-dupe-class-members": "off",
1516
"no-undef": "off",
1617
"@typescript-eslint/indent": "off",
1718
"@typescript-eslint/no-explicit-any": "off",

packages/eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"dependencies": {
3939
"@typescript-eslint/parser": "1.7.0",
40-
"@typescript-eslint/typescript-estree": "1.7.0",
40+
"@typescript-eslint/experimental-utils": "1.7.0",
4141
"eslint-utils": "^1.3.1",
4242
"regexpp": "^2.0.1",
4343
"requireindex": "^1.2.0",

packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
1+
import {
2+
TSESTree,
3+
AST_NODE_TYPES,
4+
} from '@typescript-eslint/experimental-utils';
25
import * as util from '../util';
36

47
type RuleNode =

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
AST_NODE_TYPES,
33
AST_TOKEN_TYPES,
44
TSESTree,
5-
} from '@typescript-eslint/typescript-estree';
5+
} from '@typescript-eslint/experimental-utils';
66
import * as util from '../util';
77

88
/**

packages/eslint-plugin/src/rules/await-thenable.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as tsutils from 'tsutils';
2-
import * as ts from 'typescript';
2+
import ts from 'typescript';
33

44
import * as util from '../util';
55

@@ -26,9 +26,9 @@ export default util.createRule({
2626

2727
return {
2828
AwaitExpression(node) {
29-
const originalNode = parserServices.esTreeNodeToTSNodeMap.get(
30-
node,
31-
) as ts.AwaitExpression;
29+
const originalNode = parserServices.esTreeNodeToTSNodeMap.get<
30+
ts.AwaitExpression
31+
>(node);
3232
const type = checker.getTypeAtLocation(originalNode.expression);
3333

3434
if (

packages/eslint-plugin/src/rules/ban-types.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
2-
import { ReportFixFunction } from 'ts-eslint';
1+
import {
2+
TSESLint,
3+
TSESTree,
4+
AST_NODE_TYPES,
5+
} from '@typescript-eslint/experimental-utils';
36
import * as util from '../util';
47

58
type Options = [
@@ -94,7 +97,7 @@ export default util.createRule<Options, MessageIds>({
9497
let customMessage = '';
9598
const bannedCfgValue = bannedTypes[node.name];
9699

97-
let fix: ReportFixFunction | null = null;
100+
let fix: TSESLint.ReportFixFunction | null = null;
98101

99102
if (typeof bannedCfgValue === 'string') {
100103
customMessage += ` ${bannedCfgValue}`;

packages/eslint-plugin/src/rules/camelcase.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
1+
import {
2+
TSESTree,
3+
AST_NODE_TYPES,
4+
} from '@typescript-eslint/experimental-utils';
25
import baseRule from 'eslint/lib/rules/camelcase';
36
import * as util from '../util';
47

packages/eslint-plugin/src/rules/class-name-casing.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import {
2+
TSESTree,
3+
AST_NODE_TYPES,
4+
} from '@typescript-eslint/experimental-utils';
15
import * as util from '../util';
2-
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
36

47
export default util.createRule({
58
name: 'class-name-casing',

packages/eslint-plugin/src/rules/explicit-function-return-type.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
1+
import {
2+
TSESTree,
3+
AST_NODE_TYPES,
4+
} from '@typescript-eslint/experimental-utils';
25
import * as util from '../util';
36

47
type Options = [
58
{
69
allowExpressions?: boolean;
710
allowTypedFunctionExpressions?: boolean;
8-
allowUntypedSetters?: boolean;
911
}
1012
];
1113
type MessageIds = 'missingReturnType';
@@ -42,7 +44,6 @@ export default util.createRule<Options, MessageIds>({
4244
{
4345
allowExpressions: false,
4446
allowTypedFunctionExpressions: false,
45-
allowUntypedSetters: true,
4647
},
4748
],
4849
create(context, [options]) {

0 commit comments

Comments
 (0)
0