Skip to content

Commit 7ae15ef

Browse files
committed
chore(): Update to latest typescript-eslint
1 parent 5670475 commit 7ae15ef

File tree

113 files changed

+757
-804
lines changed

Some content is hidden

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

113 files changed

+757
-804
lines changed

.eslintrc.js

Lines changed: 20 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -3,100 +3,41 @@ module.exports = {
33
node: true,
44
jest: true,
55
},
6-
76
parser: '@typescript-eslint/parser',
87
parserOptions: {
98
project: './tsconfig.build.json',
109
},
11-
plugins: [
12-
'@typescript-eslint',
13-
'prettier',
14-
'import',
15-
'jest',
16-
'eslint-plugin-tsdoc',
17-
],
10+
plugins: ['@typescript-eslint', 'prettier', 'import', 'jest', 'eslint-plugin-tsdoc'],
1811
extends: [
19-
'airbnb-base',
12+
'airbnb-typescript/base',
2013
'eslint:recommended',
21-
'plugin:@typescript-eslint/eslint-recommended',
2214
'plugin:@typescript-eslint/recommended',
15+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
16+
'plugin:jest/recommended',
17+
'plugin:jest/style',
2318
'prettier',
2419
'prettier/@typescript-eslint',
2520
],
26-
ignorePatterns: ["**/build", "**/node_modules", "documentation"],
21+
ignorePatterns: ['**/build', '**/node_modules', 'documentation'],
2722
rules: {
28-
"tsdoc/syntax": "warn",
29-
'import/extensions': [
30-
'error',
31-
'ignorePackages',
32-
{
33-
'ts': 'never',
34-
'js': 'never',
35-
},
36-
],
3723
'prettier/prettier': 'error',
38-
"no-underscore-dangle": 0,
39-
// C2FO Preference
40-
'func-names': [
41-
'error',
42-
'always',
43-
],
44-
'max-len': [
45-
'error',
46-
150,
47-
2,
48-
{
49-
'ignoreComments': false,
50-
'ignoreRegExpLiterals': true,
51-
'ignoreStrings': true,
52-
'ignoreTemplateLiterals': true,
53-
'ignoreUrls': true,
54-
},
55-
],
56-
'import/prefer-default-export': 0,
57-
'max-classes-per-file': ['error', 5],
58-
'import/no-cycle': 0,
59-
},
60-
settings: {
61-
'import/extensions': [
62-
'.ts',
63-
'.js',
64-
],
65-
'import/parsers': {
66-
'@typescript-eslint/parser': [
67-
'.ts',
68-
],
69-
},
70-
'import/resolver': {
71-
node: {
72-
'extensions': [
73-
'.ts',
74-
],
75-
},
76-
typescript: {
77-
'alwaysTryTypes': true,
78-
},
79-
},
24+
'tsdoc/syntax': 'warn',
25+
// todo remove this when upgrading airbnb-typescript
26+
'@typescript-eslint/camelcase': 'off',
27+
// never allow default export
28+
'import/prefer-default-export': 'off',
29+
// never allow default export
30+
'import/no-default-export': 'error',
31+
// needed to implement streams api :(
32+
'no-underscore-dangle': 0,
8033
},
8134
overrides: [
8235
{
83-
"files": [
84-
"*.spec.ts"
85-
],
86-
"rules": {
87-
"@typescript-eslint/explicit-function-return-type": "off",
88-
"@typescript-eslint/ban-ts-ignore": "off"
89-
}
36+
files: ['*.spec.ts'],
37+
rules: {
38+
'@typescript-eslint/explicit-function-return-type': 'off',
39+
'@typescript-eslint/ban-ts-comment': 'off',
40+
},
9041
},
91-
{
92-
"files": [
93-
"*.js",
94-
"examples/example-runner/bin/run-examples"
95-
],
96-
"rules": {
97-
"@typescript-eslint/explicit-function-return-type": "off",
98-
"@typescript-eslint/no-var-requires": "off"
99-
}
100-
}
10142
],
10243
};

0 commit comments

Comments
 (0)