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

Commit d94d334

Browse files
committed
fix(typescript): disable problematic rules
1 parent 89da0ca commit d94d334

File tree

1 file changed

+13
-10
lines changed
  • packages/eslint-config-typescript

1 file changed

+13
-10
lines changed

packages/eslint-config-typescript/index.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
'import/extensions': ['.js', '.ts'],
1212
},
1313
rules: {
14+
'no-undef': 'off',
1415
'spaced-comment': [
1516
'error',
1617
'always',
@@ -36,6 +37,7 @@ module.exports = {
3637
ts: 'never',
3738
},
3839
],
40+
'import/named': 'off', // https://github.com/benmosher/eslint-plugin-import/issues/1282
3941
'import/no-named-as-default-member': 'off', // conflicts with typescript
4042
'import/no-named-as-default': 'off', // conflicts with typescript
4143
// https://github.com/nzakas/eslint-plugin-typescript
@@ -45,24 +47,24 @@ module.exports = {
4547
camelcase: 'off',
4648
'@typescript-eslint/camelcase': 'error',
4749
'@typescript-eslint/class-name-casing': 'error',
48-
'@typescript-eslint/explicit-function-return-type': 'warn',
50+
'@typescript-eslint/explicit-function-return-type': 'off',
4951
'@typescript-eslint/explicit-member-accessibility': 'error',
5052
'@typescript-eslint/generic-type-naming': [
5153
'error',
52-
'^([TUKV]|T[A-Z][a-zA-Z]+)$',
54+
'^([TUKV]|T([A-Z0-9][a-zA-Z0-9]*){0,1})$',
5355
],
5456
'@typescript-eslint/indent': 'off',
5557
'@typescript-eslint/interface-name-prefix': 'error',
5658
'@typescript-eslint/member-delimiter-style': 'off',
5759
'@typescript-eslint/member-naming': 'off',
58-
'@typescript-eslint/member-ordering': 'error',
60+
'@typescript-eslint/member-ordering': 'off',
5961
'@typescript-eslint/no-angle-bracket-type-assertion': 'error',
6062
'no-array-constructor': 'off',
6163
'@typescript-eslint/no-array-constructor': 'error',
62-
'@typescript-eslint/no-empty-interface': 'error',
64+
'@typescript-eslint/no-empty-interface': 'off',
6365
'@typescript-eslint/no-explicit-any': 'off',
6466
'@typescript-eslint/no-extraneous-class': 'error',
65-
'@typescript-eslint/no-for-in-array': 'error',
67+
'@typescript-eslint/no-for-in-array': 'off', // requires type info
6668
'@typescript-eslint/no-inferrable-types': 'error',
6769
'@typescript-eslint/no-misused-new': 'error',
6870
'@typescript-eslint/no-namespace': 'error',
@@ -73,24 +75,25 @@ module.exports = {
7375
'@typescript-eslint/no-this-alias': 'error',
7476
'@typescript-eslint/no-triple-slash-reference': 'error',
7577
'@typescript-eslint/no-type-alias': [
76-
'error',
78+
'off',
7779
{
7880
allowAliases: 'always',
7981
allowCallbacks: 'always',
8082
allowLiterals: 'in-unions-and-intersections',
8183
allowMappedTypes: 'always',
8284
},
8385
],
86+
'@typescript-eslint/no-unnecessary-type-assertion': 'off', // requires type info
8487
'no-unused-vars': 'off',
85-
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
86-
'@typescript-eslint/no-unused-vars': 'warn',
88+
'@typescript-eslint/no-unused-vars': 'off', // in favor of tsc's `noUnusedLocals` and `noUnusedParameters`
8789
'@typescript-eslint/no-use-before-define': 'error',
90+
'no-useless-constructor': 'off',
8891
'@typescript-eslint/no-useless-constructor': 'error',
89-
'@typescript-eslint/no-var-requires': 'error',
92+
'@typescript-eslint/no-var-requires': 'off',
9093
'@typescript-eslint/prefer-interface': 'error',
9194
'@typescript-eslint/prefer-namespace-keyword': 'error',
9295
'@typescript-eslint/promise-function-async': 'off',
9396
'@typescript-eslint/type-annotation-spacing': 'off',
94-
'@typescript-eslint/restrict-plus-operands': 'error',
97+
'@typescript-eslint/restrict-plus-operands': 'off', // requires type info
9598
},
9699
};

0 commit comments

Comments
 (0)