@@ -12,13 +12,6 @@ module.exports = {
1212 'import/extensions' : [ '.js' , '.ts' ] ,
1313 } ,
1414 rules : {
15- camelcase : 'off' ,
16- 'no-array-constructor' : 'off' ,
17- 'no-restricted-globals' : 'off' , // conflicts with typescript, @see https://github.com/eslint/typescript-eslint-parser/issues/350
18- 'no-undef' : 'off' , // conflicts with typescript
19- 'no-unused-vars' : 'off' , // disabled in favor of `typescript/no-unused-vars`
20- 'no-use-before-define' : 'off' , // disabled in favor of `typescript/no-use-before-define`
21- 'no-useless-constructor' : 'off' , // conflicts with typescript
2215 'spaced-comment' : [
2316 'error' ,
2417 'always' ,
@@ -47,35 +40,59 @@ module.exports = {
4740 'import/no-named-as-default-member' : 'off' , // conflicts with typescript
4841 'import/no-named-as-default' : 'off' , // conflicts with typescript
4942 // https://github.com/nzakas/eslint-plugin-typescript
50- '@typescript-eslint/adjacent-overload-signatures' : 'off' , // TSLint is better at this
51- '@typescript-eslint/class-name-casing' : 'off' , // TSLint is better at this
52- '@typescript-eslint/explicit-function-return-type' : 'off' ,
53- '@typescript-eslint/explicit-member-accessibility' : 'off' , // TSLint is better at this
43+ '@typescript-eslint/adjacent-overload-signatures' : 'error' ,
44+ '@typescript-eslint/array-type' : 'error' ,
45+ '@typescript-eslint/ban-types' : 'error' ,
46+ camelcase : 'off' ,
47+ '@typescript-eslint/camelcase' : 'error' ,
48+ '@typescript-eslint/class-name-casing' : 'error' ,
49+ '@typescript-eslint/explicit-function-return-type' : 'warn' ,
50+ '@typescript-eslint/explicit-member-accessibility' : 'error' ,
51+ indent : 'off' ,
5452 '@typescript-eslint/generic-type-naming' : [
5553 'error' ,
5654 '^([TUKV]|T[A-Z][a-zA-Z]+)$' ,
5755 ] ,
58- '@typescript-eslint/interface-name-prefix' : 'off' , // TSLint is better at this
59- '@typescript-eslint/member-delimiter-style' : 'off' ,
56+ '@typescript-eslint/indent' : 'error' ,
57+ '@typescript-eslint/interface-name-prefix' : 'error' ,
58+ '@typescript-eslint/member-delimiter-style' : 'error' ,
6059 '@typescript-eslint/member-naming' : 'off' ,
61- '@typescript-eslint/member-ordering' : 'off' , // type annotations should come first
62- '@typescript-eslint/no-angle-bracket-type-assertion' : 'off' , // TSLint is better at this
60+ '@typescript-eslint/member-ordering' : 'error' ,
61+ '@typescript-eslint/no-angle-bracket-type-assertion' : 'error' ,
62+ 'no-array-constructor' : 'off' ,
6363 '@typescript-eslint/no-array-constructor' : 'error' ,
64- '@typescript-eslint/no-empty-interface' : 'off' , // TSLint is better at this
65- '@typescript-eslint/no-explicit-any' : 'off' , // TSLint is better at this
66- '@typescript-eslint/no-inferrable-types' : 'off' , // TSLint is better at this
67- '@typescript-eslint/no-namespace' : 'off' , // TSLint is better at this
68- '@typescript-eslint/no-non-null-assertion' : 'off' , // TSLint is better at this
69- '@typescript-eslint/no-parameter-properties' : 'off' , // TSLint is better at this
70- '@typescript-eslint/no-triple-slash-reference' : 'off' , // TSLint is better at this
71- '@typescript-eslint/no-type-alias' : 'off' , // TSLint is better at this
72- '@typescript-eslint/no-unused-vars' : 'error' ,
73- '@typescript-eslint/no-var-requires' : 'off' , // TSLint is better at this
74- '@typescript-eslint/no-use-before-define' : [
64+ '@typescript-eslint/no-empty-interface' : 'error' ,
65+ '@typescript-eslint/no-explicit-any' : 'off' ,
66+ '@typescript-eslint/no-extraneous-class' : 'error' ,
67+ '@typescript-eslint/no-for-in-array' : 'error' ,
68+ '@typescript-eslint/no-inferrable-types' : 'error' ,
69+ '@typescript-eslint/no-misused-new' : 'error' ,
70+ '@typescript-eslint/no-namespace' : 'error' ,
71+ '@typescript-eslint/no-non-null-assertion' : 'error' ,
72+ '@typescript-eslint/no-object-literal-type-assertion' : 'error' ,
73+ '@typescript-eslint/no-parameter-properties' : 'error' ,
74+ '@typescript-eslint/no-require-imports' : 'off' ,
75+ '@typescript-eslint/no-this-alias' : 'error' ,
76+ '@typescript-eslint/no-triple-slash-reference' : 'error' ,
77+ '@typescript-eslint/no-type-alias' : [
7578 'error' ,
76- { functions : true , classes : true , variables : true } ,
79+ {
80+ allowAliases : 'always' ,
81+ allowCallbacks : 'always' ,
82+ allowLiterals : 'in-unions-and-intersections' ,
83+ allowMappedTypes : 'always' ,
84+ } ,
7785 ] ,
78- '@typescript-eslint/prefer-namespace-keyword' : 'off' , // TSLint is better at this
79- '@typescript-eslint/type-annotation-spacing' : 'off' , // not necessary with prettier
86+ 'no-unused-vars' : 'off' ,
87+ '@typescript-eslint/no-unnecessary-type-assertion' : 'error' ,
88+ '@typescript-eslint/no-unused-vars' : 'warn' ,
89+ '@typescript-eslint/no-use-before-define' : 'error' ,
90+ '@typescript-eslint/no-useless-constructor' : 'error' ,
91+ '@typescript-eslint/no-var-requires' : 'error' ,
92+ '@typescript-eslint/prefer-interface' : 'error' ,
93+ '@typescript-eslint/prefer-namespace-keyword' : 'error' ,
94+ '@typescript-eslint/promise-function-async' : 'off' ,
95+ '@typescript-eslint/type-annotation-spacing' : 'error' ,
96+ '@typescript-eslint/restrict-plus-operands' : 'error' ,
8097 } ,
8198} ;
0 commit comments