@fullstacksjs/eslint-config 8.12.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,162 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- '@typescript-eslint/adjacent-overload-signatures': 'error',
4
- '@typescript-eslint/array-type': 'error',
5
- '@typescript-eslint/ban-ts-comment': [
6
- 'error',
7
- {
8
- 'ts-expect-error': 'allow-with-description',
9
- 'ts-ignore': 'allow-with-description',
10
- 'ts-nocheck': 'allow-with-description',
11
- 'ts-check': 'allow-with-description',
12
- 'minimumDescriptionLength': 3,
13
- },
14
- ],
15
- '@typescript-eslint/ban-tslint-comment': 'off',
16
- '@typescript-eslint/ban-types': 'error',
17
- '@typescript-eslint/camelcase': 'off',
18
- '@typescript-eslint/class-literal-property-style': ['error', 'getters'],
19
- '@typescript-eslint/consistent-generic-constructors': ['warn', 'constructor'],
20
- '@typescript-eslint/consistent-indexed-object-style': 'off',
21
- '@typescript-eslint/consistent-type-assertions': 'error',
22
- '@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
23
- '@typescript-eslint/default-param-last': 'warn',
24
- '@typescript-eslint/explicit-function-return-type': 'off',
25
- '@typescript-eslint/explicit-member-accessibility': 'off',
26
- '@typescript-eslint/explicit-module-boundary-types': 'off',
27
- '@typescript-eslint/generic-type-naming': 'off',
28
- '@typescript-eslint/init-declarations': ['off'],
29
- '@typescript-eslint/lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
30
- '@typescript-eslint/member-naming': 'off',
31
- '@typescript-eslint/member-ordering': 'off',
32
- '@typescript-eslint/method-signature-style': ['warn', 'property'],
33
- '@typescript-eslint/naming-convention': ['warn', ...require('./naming-convention')], // eslint-disable-line node/global-require
34
- '@typescript-eslint/no-array-constructor': 'error',
35
- '@typescript-eslint/no-base-to-string': 'off', // false negative
36
- '@typescript-eslint/no-confusing-non-null-assertion': 'error',
37
- '@typescript-eslint/no-dupe-class-members': 'error',
38
- '@typescript-eslint/no-duplicate-enum-values': 'error',
39
- '@typescript-eslint/no-dynamic-delete': 'error',
40
- '@typescript-eslint/no-empty-function': 'error',
41
- '@typescript-eslint/no-empty-interface': 'off', // Annoying with auto-fix on save.
42
- '@typescript-eslint/no-explicit-any': 'off',
43
- '@typescript-eslint/no-extra-non-null-assertion': 'error',
44
- '@typescript-eslint/no-extraneous-class': ['warn', { allowWithDecorator: true }],
45
- '@typescript-eslint/no-inferrable-types': 'off',
46
- '@typescript-eslint/no-invalid-this': ['error', { capIsConstructor: false }],
47
- '@typescript-eslint/no-invalid-void-type': 'error',
48
- '@typescript-eslint/no-loop-func': 'error',
49
- '@typescript-eslint/no-loss-of-precision': 'error',
50
- '@typescript-eslint/no-magic-numbers': ['off', { ignoreEnums: true }], // Not good enough yet
51
- '@typescript-eslint/no-misused-new': 'error',
52
- '@typescript-eslint/no-namespace': 'error',
53
- '@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', disallowTypeAnnotations: false }],
54
- '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
55
- '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
56
- '@typescript-eslint/no-non-null-assertion': 'off',
57
- '@typescript-eslint/no-redeclare': ['off', { ignoreDeclarationMerge: true }], // useful in FP.
58
- '@typescript-eslint/no-require-imports': 'error',
59
- '@typescript-eslint/no-restricted-imports': 'off',
60
- '@typescript-eslint/no-shadow': 'error',
61
- '@typescript-eslint/no-this-alias': 'error',
62
- '@typescript-eslint/no-type-alias': 'off',
63
- '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
64
- '@typescript-eslint/no-unsafe-argument': 'off',
65
- '@typescript-eslint/no-unsafe-assignment': 'off',
66
- '@typescript-eslint/no-unsafe-call': 'off',
67
- '@typescript-eslint/no-unsafe-declaration-merging': 'warn',
68
- '@typescript-eslint/no-unsafe-member-access': 'off',
69
- '@typescript-eslint/no-unsafe-return': 'off',
70
- '@typescript-eslint/no-untyped-public-signature': 'off',
71
- '@typescript-eslint/no-unused-expressions': 'error',
72
- '@typescript-eslint/no-unused-vars-experimental': 'off', // Why two rules?
73
- '@typescript-eslint/no-unused-vars': [
74
- 'warn',
75
- { argsIgnorePattern: '^_', varsIgnorePattern: '^[iI]gnore(d)?', args: 'after-used', ignoreRestSiblings: true },
76
- ],
77
- '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: true }],
78
- '@typescript-eslint/no-useless-constructor': 'error',
79
- '@typescript-eslint/no-useless-empty-export': 'warn',
80
- '@typescript-eslint/no-var-requires': 'error',
81
- '@typescript-eslint/object-curly-spacing': 'warn',
82
- '@typescript-eslint/parameter-properties': 'off',
83
- '@typescript-eslint/padding-line-between-statements': [
84
- 'warn',
85
- { blankLine: 'always', prev: '*', next: ['class', 'for', 'while', 'switch', 'do', 'directive', 'function', 'iife', 'block-like'] },
86
- { blankLine: 'always', prev: ['block-like', 'block'], next: ['return'] },
87
- { blankLine: 'always', prev: ['block-like'], next: ['const', 'let', 'var'] },
88
- { blankLine: 'always', prev: ['const', 'let', 'var'], next: ['type', 'interface'] },
89
- { blankLine: 'always', prev: ['multiline-const', 'multiline-let', 'multiline-var'], next: ['if'] },
90
- ],
91
- '@typescript-eslint/prefer-as-const': 'warn',
92
- '@typescript-eslint/prefer-enum-initializers': 'off',
93
- '@typescript-eslint/prefer-for-of': 'warn',
94
- '@typescript-eslint/prefer-function-type': 'warn',
95
- '@typescript-eslint/prefer-literal-enum-member': ['error', { allowBitwiseExpressions: true }],
96
- '@typescript-eslint/prefer-namespace-keyword': 'error',
97
- '@typescript-eslint/prefer-optional-chain': 'warn',
98
- '@typescript-eslint/prefer-readonly-parameter-types': [
99
- 'off',
100
- { checkParameterProperties: true, ignoreInferredTypes: false, treatMethodsAsReadonly: true },
101
- ], // I'm not sure...
102
- '@typescript-eslint/prefer-readonly': 'off',
103
- '@typescript-eslint/prefer-readonlysemi': 'off', // Annoying with auto-fix on save.
104
- '@typescript-eslint/prefer-ts-expect-error': 'off',
105
- '@typescript-eslint/promise-function-async': 'off',
106
- '@typescript-eslint/restrict-plus-operands': 'off',
107
- '@typescript-eslint/restrict-template-expressions': [
108
- 'off',
109
- { allowNumber: true, allowBoolean: false, allowAny: false, allowNullish: false, allowRegExp: false },
110
- ],
111
- '@typescript-eslint/sort-type-constituents': [
112
- 'warn',
113
- {
114
- checkIntersections: true,
115
- checkUnions: true,
116
- groupOrder: [
117
- 'named',
118
- 'keyword',
119
- 'operator',
120
- 'literal',
121
- 'function',
122
- 'import',
123
- 'conditional',
124
- 'object',
125
- 'tuple',
126
- 'intersection',
127
- 'union',
128
- 'nullish',
129
- ],
130
- },
131
- ],
132
- '@typescript-eslint/strict-boolean-expressions': 'off', // Annoying
133
- '@typescript-eslint/space-before-blocks': 'off',
134
-
135
- '@typescript-eslint/triple-slash-reference': 'error',
136
- '@typescript-eslint/typedef': ['error', { parameter: false, arrowParameter: false, variableDeclaration: false }],
137
- '@typescript-eslint/unified-signatures': 'error',
138
- '@typescript-eslint/key-spacing': 'off',
139
-
140
- // collisions
141
- 'key-spacing': 'off',
142
- 'camelcase': 'off',
143
- 'default-param-last': 'off',
144
- 'init-declarations': 'off',
145
- 'lines-between-class-members': 'off',
146
- 'no-invalid-this': 'off',
147
- 'no-loop-func': 'off',
148
- 'no-redeclare': 'off',
149
- 'no-restricted-imports': 'off',
150
- 'no-shadow': 'off',
151
- 'no-unused-vars': 'off',
152
- 'no-use-before-define': 'off',
153
- 'no-useless-constructor': 'off',
154
- 'object-curly-spacing': 'off',
155
- 'padding-line-between-statements': 'off',
156
- 'space-before-blocks': 'off',
157
-
158
- // open issues
159
- 'react/jsx-no-useless-fragment': 'off', // Need useless-fragment for JSX return type
160
- 'dot-notation': 'off', // Need to have IndexSignaturePropertyAccess Typescript compiler option
161
- },
162
- };
@@ -1,23 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- 'default-param-last': 'warn',
4
- 'no-restricted-globals': ['error', 'event', 'fdescribe'],
5
- 'no-delete-var': 'error',
6
- 'no-label-var': 'error',
7
- 'no-shadow-restricted-names': 'error',
8
- 'no-shadow': 'error',
9
- 'no-undef-init': 'error',
10
- 'no-undef': 'error',
11
- 'no-undefined': 'off',
12
- 'no-unused-vars': [
13
- 'error',
14
- {
15
- argsIgnorePattern: '^_',
16
- varsIgnorePattern: '^ignore(d)?',
17
- args: 'after-used',
18
- ignoreRestSiblings: true,
19
- },
20
- ],
21
- 'no-use-before-define': ['error', 'nofunc'],
22
- },
23
- };