@crycode/eslint-config 1.2.1 → 2.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.
package/README.md CHANGED
@@ -11,43 +11,65 @@ Add `eslint` and `@crycode/eslint-config` to your devDependencies:
11
11
  npm install --save-dev eslint @crycode/eslint-config
12
12
  ```
13
13
 
14
- Add a file named `.eslintrc.js` to your project root directory:
14
+ For TypeScript also add `typescript-eslint`:
15
15
 
16
- ```js
17
- module.exports = {
18
- extends: [
19
- '@crycode/eslint-config'
20
- ],
21
- parserOptions: {
22
- project: [
23
- './tsconfig.json',
24
- ],
25
- },
26
- };
16
+ ```shell
17
+ npm install --save-dev typescript-eslint
27
18
  ```
28
19
 
29
- If you habe multiple tsconfig files, add them all to `project` like this:
20
+ Add a file named `eslint.config.js` to your project root directory:
30
21
 
31
22
  ```js
32
- module.exports = {
33
- extends: [
34
- '@crycode/eslint-config'
35
- ],
36
- parserOptions: {
37
- project: [
38
- './tsconfig.backend.json',
39
- './tsconfig.frontend.json',
40
- ],
23
+ import crycode from '@crycode/eslint-config';
24
+
25
+ export default [
26
+ ...crycode.configs.js,
27
+ ...crycode.configs.stylistic,
28
+ ];
29
+ ```
30
+
31
+ Or for TypeScript:
32
+
33
+ ```ts
34
+ import tseslint from 'typescript-eslint';
35
+ import crycode from '@crycode/eslint-config';
36
+
37
+ export default tseslint.config(
38
+ ...crycode.configs.ts,
39
+ ...crycode.configs.stylistic,
40
+ {
41
+ languageOptions: {
42
+ parserOptions: {
43
+ ecmaVersion: 2022,
44
+ sourceType: 'module',
45
+ project: [
46
+ './tsconfig.json',
47
+ ],
48
+ },
49
+ },
41
50
  },
42
- };
51
+ );
43
52
  ```
44
53
 
54
+ If you habe multiple tsconfig files, add them all to `project` array:
55
+
45
56
  ## Changelog
46
57
 
47
58
  <!--
48
59
  Placeholder for the next version (at the beginning of the line):
49
60
  ### **WORK IN PROGRESS**
50
61
  -->
62
+ ### 2.0.0 (2024-08-19)
63
+
64
+ * Migrate to eslint 9
65
+ * Provide configs for TS and JS from a single package
66
+ * Removed `eslint-plugin-import` for now since it's not ready for eslint 9 for now
67
+
68
+ ### 1.2.2 (2023-09-07)
69
+
70
+ * Fixed usage of `eslint-plugin-import`
71
+ * Added recommended `import` rules
72
+
51
73
  ### 1.2.1 (2023-09-07)
52
74
 
53
75
  * Replaced deprecated rule `@typescript-eslint/no-duplicate-imports` with `import/no-duplicates` (added dependency to `eslint-plugin-import`)
@@ -78,7 +100,7 @@ module.exports = {
78
100
 
79
101
  MIT License
80
102
 
81
- Copyright (c) 2021-2023 Peter Müller <peter@crycode.de>
103
+ Copyright (c) 2021-2024 Peter Müller <peter@crycode.de>
82
104
 
83
105
  Permission is hereby granted, free of charge, to any person obtaining a copy
84
106
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,13 @@
1
+ export default [
2
+ {
3
+ languageOptions: {
4
+ parserOptions: {
5
+ ecmaVersion: 2022,
6
+ sourceType: 'module',
7
+ },
8
+ },
9
+ linterOptions: {
10
+ reportUnusedDisableDirectives: 'warn',
11
+ },
12
+ },
13
+ ];
package/configs/js.js ADDED
@@ -0,0 +1,66 @@
1
+ import eslint from '@eslint/js';
2
+ import base from './base.js';
3
+
4
+ export default [
5
+ eslint.configs.recommended,
6
+ ...base,
7
+ {
8
+ rules: {
9
+ /* eslint-disable @stylistic/quote-props */
10
+
11
+ 'array-callback-return': 'warn',
12
+
13
+ 'default-param-last': 'error',
14
+
15
+ 'eqeqeq': 'warn',
16
+
17
+ 'no-caller': 'error',
18
+
19
+ 'no-console': 'error',
20
+
21
+ 'no-duplicate-imports': 'warn',
22
+
23
+ 'no-eval': 'error',
24
+
25
+ 'no-implied-eval': 'error',
26
+
27
+ 'no-invalid-this': 'error',
28
+
29
+ 'no-label-var': 'warn',
30
+
31
+ 'no-loop-func': 'error',
32
+
33
+ 'no-loss-of-precision': 'error',
34
+
35
+ 'no-redeclare': 'error',
36
+
37
+ 'no-shadow': 'error',
38
+
39
+ 'no-throw-literal': 'error',
40
+
41
+ 'no-undef-init': 'warn',
42
+
43
+ 'no-unused-expressions': 'warn',
44
+
45
+ 'no-useless-escape': 'warn',
46
+
47
+ 'no-var': 'error',
48
+
49
+ 'prefer-const': 'error',
50
+
51
+ 'radix': 'warn',
52
+
53
+ 'sort-imports': [
54
+ 'warn',
55
+ {
56
+ ignoreCase: true,
57
+ ignoreDeclarationSort: true,
58
+ },
59
+ ],
60
+
61
+ 'yoda': 'warn',
62
+
63
+ /* eslint-enable @stylistic/quote-props */
64
+ },
65
+ },
66
+ ];
@@ -0,0 +1,130 @@
1
+ import stylistic from '@stylistic/eslint-plugin';
2
+
3
+ export default [
4
+ stylistic.configs['recommended-flat'],
5
+ {
6
+
7
+ plugins: {
8
+ '@stylistic': stylistic,
9
+ },
10
+
11
+ rules: {
12
+
13
+ '@stylistic/array-bracket-spacing': [ 'warn', 'always' ],
14
+
15
+ '@stylistic/arrow-parens': [ 'warn', 'always' ],
16
+
17
+ '@stylistic/arrow-spacing': [
18
+ 'warn',
19
+ {
20
+ after: true,
21
+ before: true,
22
+ },
23
+ ],
24
+
25
+ '@stylistic/brace-style': [
26
+ 'error',
27
+ '1tbs',
28
+ {
29
+ allowSingleLine: true,
30
+ },
31
+ ],
32
+
33
+ '@stylistic/comma-dangle': [ 'warn', 'always-multiline' ],
34
+
35
+ '@stylistic/eol-last': 'warn',
36
+
37
+ '@stylistic/function-call-spacing': 'error',
38
+
39
+ '@stylistic/indent': [
40
+ 'error',
41
+ 2,
42
+ {
43
+ SwitchCase: 1,
44
+ MemberExpression: 1,
45
+ },
46
+ ],
47
+
48
+ '@stylistic/jsx-quotes': [ 'error', 'prefer-single' ],
49
+
50
+ '@stylistic/linebreak-style': [ 'warn', 'unix' ],
51
+
52
+ '@stylistic/lines-between-class-members': 'warn',
53
+
54
+ '@stylistic/member-delimiter-style': [
55
+ 'error',
56
+ {
57
+ multiline: {
58
+ delimiter: 'semi',
59
+ requireLast: true,
60
+ },
61
+ singleline: {
62
+ delimiter: 'comma',
63
+ requireLast: false,
64
+ },
65
+ },
66
+ ],
67
+
68
+ '@stylistic/no-mixed-operators': 'warn',
69
+
70
+ '@stylistic/no-trailing-spaces': 'warn',
71
+
72
+ '@stylistic/object-curly-spacing': [ 'warn', 'always' ],
73
+
74
+ '@stylistic/padded-blocks': 'off',
75
+
76
+ '@stylistic/quote-props': [ 'warn', 'as-needed' ],
77
+
78
+ '@stylistic/quotes': [
79
+ 'error',
80
+ 'single',
81
+ {
82
+ avoidEscape: true,
83
+ allowTemplateLiterals: true,
84
+ },
85
+ ],
86
+
87
+ '@stylistic/rest-spread-spacing': [
88
+ 'error',
89
+ 'never',
90
+ ],
91
+
92
+ '@stylistic/semi': [
93
+ 'warn',
94
+ 'always',
95
+ {
96
+ omitLastInOneLineBlock: false,
97
+ },
98
+ ],
99
+
100
+ '@stylistic/semi-style': 'warn',
101
+
102
+ '@stylistic/space-before-blocks': 'warn',
103
+
104
+ '@stylistic/space-before-function-paren': [ 'warn', 'always' ],
105
+
106
+ '@stylistic/space-infix-ops': [
107
+ 'error',
108
+ {
109
+ int32Hint: false,
110
+ },
111
+ ],
112
+
113
+ '@stylistic/spaced-comment': [
114
+ 'warn',
115
+ 'always',
116
+ {
117
+ exceptions: [ '-', '+', '*' ],
118
+ line: {
119
+ markers: [ '/' ],
120
+ },
121
+ block: {
122
+ balanced: true,
123
+ },
124
+ },
125
+ ],
126
+
127
+ '@stylistic/type-annotation-spacing': 'warn',
128
+ },
129
+ },
130
+ ];
package/configs/ts.js ADDED
@@ -0,0 +1,218 @@
1
+ import tseslint from 'typescript-eslint';
2
+ import js from './js.js';
3
+
4
+ export default [
5
+ ...js,
6
+ ...tseslint.configs.recommended,
7
+ ...tseslint.configs.stylistic,
8
+ {
9
+ languageOptions: {
10
+ parserOptions: {
11
+ ecmaVersion: 2022,
12
+ sourceType: 'module',
13
+ project: [
14
+ './tsconfig.json',
15
+ ],
16
+ },
17
+ },
18
+
19
+ rules: {
20
+ '@typescript-eslint/consistent-indexed-object-style': 'off',
21
+
22
+ '@typescript-eslint/consistent-type-assertions': [
23
+ 'error',
24
+ {
25
+ assertionStyle: 'as',
26
+ },
27
+ ],
28
+
29
+ 'default-param-last': 'off',
30
+ '@typescript-eslint/default-param-last': 'error',
31
+
32
+ '@typescript-eslint/explicit-function-return-type': [
33
+ 'error',
34
+ {
35
+ allowExpressions: true,
36
+ },
37
+ ],
38
+
39
+ '@typescript-eslint/explicit-member-accessibility': [
40
+ 'error',
41
+ {
42
+ overrides: {
43
+ constructors: 'off',
44
+ },
45
+ },
46
+ ],
47
+
48
+ '@typescript-eslint/member-ordering': [
49
+ 'warn',
50
+ {
51
+ default: {
52
+ memberTypes: [
53
+ // Index signature
54
+ 'signature',
55
+ 'call-signature',
56
+
57
+ // Fields
58
+ 'public-abstract-field',
59
+ 'protected-abstract-field',
60
+
61
+ 'public-static-field',
62
+ 'protected-static-field',
63
+ 'private-static-field',
64
+
65
+ 'public-instance-field',
66
+ 'protected-instance-field',
67
+ 'private-instance-field',
68
+
69
+ 'public-field',
70
+ 'protected-field',
71
+ 'private-field',
72
+
73
+ 'static-field',
74
+ 'instance-field',
75
+ 'abstract-field',
76
+
77
+ 'field',
78
+
79
+ // Constructors
80
+ 'public-constructor',
81
+ 'protected-constructor',
82
+ 'private-constructor',
83
+
84
+ 'constructor',
85
+
86
+ // Methods
87
+ 'public-abstract-method',
88
+ 'public-static-method',
89
+ 'public-instance-method',
90
+ 'public-method',
91
+
92
+ 'protected-abstract-method',
93
+ 'protected-static-method',
94
+ 'protected-instance-method',
95
+ 'protected-method',
96
+
97
+ 'private-static-method',
98
+ 'private-instance-method',
99
+ 'private-method',
100
+
101
+ 'abstract-method',
102
+ 'static-method',
103
+ 'instance-method',
104
+
105
+ 'method',
106
+ ],
107
+ },
108
+ },
109
+ ],
110
+
111
+ '@typescript-eslint/method-signature-style': 'warn',
112
+
113
+ '@typescript-eslint/naming-convention': [
114
+ 'error',
115
+ {
116
+ selector: [ 'enum', 'interface', 'class' ],
117
+ format: [ 'PascalCase' ],
118
+ },
119
+ {
120
+ selector: 'enumMember',
121
+ format: [ 'PascalCase', 'UPPER_CASE' ],
122
+ },
123
+ ],
124
+
125
+ '@typescript-eslint/no-confusing-non-null-assertion': 'error',
126
+
127
+ 'no-implied-eval': 'off',
128
+ '@typescript-eslint/no-implied-eval': 'error',
129
+
130
+ '@typescript-eslint/no-inferrable-types': 'off',
131
+
132
+ 'no-invalid-this': 'off',
133
+ '@typescript-eslint/no-invalid-this': 'error',
134
+
135
+ 'no-loop-func': 'off',
136
+ '@typescript-eslint/no-loop-func': 'error',
137
+
138
+ 'no-loss-of-precision': 'off',
139
+ '@typescript-eslint/no-loss-of-precision': 'error',
140
+
141
+ '@typescript-eslint/no-namespace': 'error',
142
+
143
+ '@typescript-eslint/parameter-properties': 'error',
144
+
145
+ 'no-redeclare': 'off',
146
+ '@typescript-eslint/no-redeclare': 'error',
147
+
148
+ '@typescript-eslint/no-require-imports': 'error',
149
+
150
+ 'no-shadow': 'off',
151
+ '@typescript-eslint/no-shadow': 'error',
152
+
153
+ '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
154
+
155
+ '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
156
+
157
+ '@typescript-eslint/no-unsafe-assignment': 'warn',
158
+
159
+ '@typescript-eslint/no-unsafe-call': 'warn',
160
+
161
+ 'no-unused-expressions': 'off',
162
+ '@typescript-eslint/no-unused-expressions': 'warn',
163
+
164
+ '@typescript-eslint/no-unused-vars': [
165
+ 'warn',
166
+ {
167
+ args: 'all',
168
+ argsIgnorePattern: '^_',
169
+ caughtErrors: 'all',
170
+ caughtErrorsIgnorePattern: '^_',
171
+ destructuredArrayIgnorePattern: '^_',
172
+ ignoreRestSiblings: true,
173
+ varsIgnorePattern: '^_',
174
+ },
175
+ ],
176
+
177
+ '@typescript-eslint/no-use-before-define': 'error',
178
+
179
+ '@typescript-eslint/non-nullable-type-assertion-style': 'warn',
180
+
181
+ '@typescript-eslint/prefer-includes': 'warn',
182
+
183
+ '@typescript-eslint/prefer-nullish-coalescing': [
184
+ 'warn',
185
+ {
186
+ ignoreConditionalTests: true,
187
+ },
188
+ ],
189
+
190
+ '@typescript-eslint/prefer-optional-chain': 'warn',
191
+
192
+ '@typescript-eslint/prefer-string-starts-ends-with': 'warn',
193
+
194
+ '@typescript-eslint/prefer-ts-expect-error': 'warn',
195
+
196
+ '@typescript-eslint/promise-function-async': [
197
+ 'error',
198
+ {
199
+ checkArrowFunctions: false,
200
+ },
201
+ ],
202
+
203
+ '@typescript-eslint/restrict-plus-operands': [
204
+ 'error',
205
+ {
206
+ allowAny: true,
207
+ },
208
+ ],
209
+
210
+ 'no-return-await': 'off',
211
+ '@typescript-eslint/return-await': 'warn',
212
+
213
+ '@typescript-eslint/switch-exhaustiveness-check': 'warn',
214
+
215
+ '@typescript-eslint/unified-signatures': 'warn',
216
+ },
217
+ },
218
+ ];
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import js from './configs/js.js';
2
+ import ts from './configs/ts.js';
3
+ import stylistic from './configs/stylistic.js';
4
+
5
+ export default {
6
+ configs: {
7
+ js,
8
+ ts,
9
+ stylistic,
10
+ },
11
+ };
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@crycode/eslint-config",
3
- "version": "1.2.1",
4
- "description": "ESLint configuration to be used with TypeScript according to my personal preferences",
5
- "main": "eslint-config.js",
3
+ "version": "2.0.0",
4
+ "description": "ESLint configuration to be used with JavaScript or TypeScript according to my personal preferences",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "type": "module",
6
8
  "scripts": {
9
+ "lint": "eslint .",
7
10
  "release": "release-script"
8
11
  },
9
12
  "author": {
@@ -14,11 +17,13 @@
14
17
  "keywords": [
15
18
  "eslint",
16
19
  "eslintconfig",
20
+ "javascript",
17
21
  "typescript"
18
22
  ],
19
23
  "license": "MIT",
20
24
  "files": [
21
- "eslint-config.js",
25
+ "index.js",
26
+ "configs/*.js",
22
27
  "*.md"
23
28
  ],
24
29
  "repository": {
@@ -26,16 +31,19 @@
26
31
  "url": "https://github.com/crycode-de/eslint-config.git"
27
32
  },
28
33
  "dependencies": {
29
- "@typescript-eslint/eslint-plugin": "^6.6.0",
30
- "@typescript-eslint/parser": "^6.6.0",
31
- "eslint-plugin-import": "^2.28.1"
34
+ "@eslint/js": "^9.9.0",
35
+ "@stylistic/eslint-plugin": "^2.6.4",
36
+ "@stylistic/eslint-plugin-js": "^2.6.4",
37
+ "@types/eslint__js": "^8.42.3"
32
38
  },
33
39
  "peerDependencies": {
34
- "eslint": "^8.48.0"
40
+ "eslint": "^9.9.0",
41
+ "typescript-eslint": "^8.1.0"
35
42
  },
36
43
  "devDependencies": {
37
- "@alcalzone/release-script": "^3.6.0",
38
- "@alcalzone/release-script-plugin-license": "^3.5.9",
39
- "@alcalzone/release-script-plugin-manual-review": "^3.5.9"
44
+ "@alcalzone/release-script": "^3.8.0",
45
+ "@alcalzone/release-script-plugin-license": "^3.7.0",
46
+ "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
47
+ "eslint": "^9.9.0"
40
48
  }
41
49
  }
package/eslint-config.js DELETED
@@ -1,395 +0,0 @@
1
- /**
2
- * ESLint configuration to be used with TypeScript according to my
3
- * personal preferences.
4
- */
5
-
6
- module.exports = {
7
- parser: '@typescript-eslint/parser',
8
-
9
- parserOptions: {
10
- ecmaVersion: 2021,
11
- sourceType: 'module',
12
- project: [
13
- './tsconfig.json'
14
- ],
15
- },
16
-
17
- extends: [
18
- 'plugin:@typescript-eslint/recommended',
19
- ],
20
-
21
- plugins: [],
22
-
23
- ignorePatterns: [
24
- '/build/*',
25
- '/dist/*',
26
- ],
27
-
28
- rules: {
29
-
30
- 'array-bracket-spacing': ['warn', 'always'],
31
-
32
- 'array-callback-return': 'warn',
33
-
34
- 'arrow-parens': ['warn', 'always'],
35
-
36
- 'arrow-spacing': 'warn',
37
-
38
- 'brace-style': 'off',
39
- '@typescript-eslint/brace-style': [
40
- 'error',
41
- '1tbs',
42
- {
43
- allowSingleLine: true,
44
- },
45
- ],
46
-
47
- 'comma-dangle': 'off',
48
- '@typescript-eslint/comma-dangle': [
49
- 'warn',
50
- {
51
- arrays: 'always-multiline',
52
- objects: 'always-multiline',
53
- imports: 'always-multiline',
54
- exports: 'always-multiline',
55
- functions: 'always-multiline',
56
- enums: 'always-multiline',
57
- generics: 'always-multiline',
58
- tuples: 'always-multiline',
59
- },
60
- ],
61
-
62
- 'comma-spacing': 'off',
63
- '@typescript-eslint/comma-spacing': 'error',
64
-
65
- '@typescript-eslint/consistent-type-assertions': [
66
- 'error',
67
- {
68
- assertionStyle: 'as',
69
- },
70
- ],
71
-
72
- 'default-param-last': 'off',
73
- '@typescript-eslint/default-param-last': 'error',
74
-
75
- 'dot-location': ['warn', 'property'],
76
-
77
- 'eol-last': 'warn',
78
-
79
- 'eqeqeq': 'warn',
80
-
81
- '@typescript-eslint/explicit-function-return-type': [
82
- 'error',
83
- {
84
- allowExpressions: true,
85
- },
86
- ],
87
-
88
- '@typescript-eslint/explicit-member-accessibility': [
89
- 'error',
90
- {
91
- overrides: {
92
- constructors: 'off',
93
- },
94
- },
95
- ],
96
-
97
- '@typescript-eslint/func-call-spacing': 'error',
98
-
99
- 'indent': 'off',
100
- '@typescript-eslint/indent': [
101
- 'error',
102
- 2,
103
- {
104
- SwitchCase: 1,
105
- MemberExpression: 'off',
106
- },
107
- ],
108
-
109
- 'jsx-quotes': ['error', 'prefer-single'],
110
-
111
- 'keyword-spacing': 'off',
112
- '@typescript-eslint/keyword-spacing': 'error',
113
-
114
- 'linebreak-style': ['warn', 'unix'],
115
-
116
- 'lines-between-class-members': 'off',
117
- '@typescript-eslint/lines-between-class-members': 'warn',
118
-
119
- '@typescript-eslint/member-delimiter-style': [
120
- 'error',
121
- {
122
- multiline: {
123
- delimiter: 'semi',
124
- requireLast: true,
125
- },
126
- singleline: {
127
- delimiter: 'comma',
128
- requireLast: false,
129
- },
130
- },
131
- ],
132
-
133
- '@typescript-eslint/member-ordering': [
134
- 'warn',
135
- {
136
- default: [
137
- // Index signature
138
- //'signature',
139
-
140
- // Fields
141
- 'public-abstract-field',
142
- 'protected-abstract-field',
143
-
144
- 'public-static-field',
145
- 'protected-static-field',
146
- 'private-static-field',
147
-
148
- //'public-decorated-field',
149
- //'protected-decorated-field',
150
- //'private-decorated-field',
151
-
152
- 'public-instance-field',
153
- 'protected-instance-field',
154
- 'private-instance-field',
155
-
156
- 'public-field',
157
- 'protected-field',
158
- 'private-field',
159
-
160
- 'static-field',
161
- 'instance-field',
162
- 'abstract-field',
163
-
164
- //'decorated-field',
165
-
166
- 'field',
167
-
168
- // Constructors
169
- 'public-constructor',
170
- 'protected-constructor',
171
- 'private-constructor',
172
-
173
- 'constructor',
174
-
175
- // Methods
176
- 'public-abstract-method',
177
- 'public-static-method',
178
- //'public-decorated-method',
179
- 'public-instance-method',
180
- 'public-method',
181
-
182
- 'protected-abstract-method',
183
- 'protected-static-method',
184
- //'protected-decorated-method',
185
- 'protected-instance-method',
186
- 'protected-method',
187
-
188
- 'private-static-method',
189
- //'private-decorated-method',
190
- 'private-instance-method',
191
- 'private-method',
192
-
193
- 'abstract-method',
194
- 'static-method',
195
- //'decorated-method',
196
- 'instance-method',
197
-
198
- 'method',
199
- ],
200
- },
201
- ],
202
-
203
- '@typescript-eslint/method-signature-style': 'warn',
204
-
205
- '@typescript-eslint/naming-convention': [
206
- 'error',
207
- {
208
- selector: ['enum', 'interface', 'class'],
209
- format: ['PascalCase'],
210
- },
211
- {
212
- selector: 'enumMember',
213
- format: ['PascalCase', 'UPPER_CASE'],
214
- },
215
- ],
216
-
217
- 'no-caller': 'error',
218
-
219
- '@typescript-eslint/no-confusing-non-null-assertion': 'error',
220
-
221
- 'no-console': 'error',
222
-
223
- 'no-duplicate-imports': 'off',
224
- 'import/no-duplicates': [
225
- 'error',
226
- {
227
- considerQueryString: true,
228
- },
229
- ],
230
-
231
- 'no-eval': 'error',
232
-
233
- 'no-implied-eval': 'off',
234
- '@typescript-eslint/no-implied-eval': 'error',
235
-
236
- '@typescript-eslint/no-inferrable-types': 'off',
237
-
238
- 'no-invalid-this': 'off',
239
- '@typescript-eslint/no-invalid-this': 'error',
240
-
241
- 'no-label-var': 'warn',
242
-
243
- 'no-loop-func': 'off',
244
- '@typescript-eslint/no-loop-func': 'error',
245
-
246
- 'no-loss-of-precision': 'off',
247
- '@typescript-eslint/no-loss-of-precision': 'error',
248
-
249
- 'no-mixed-operators': 'warn',
250
-
251
- '@typescript-eslint/no-namespace': 'error',
252
-
253
- '@typescript-eslint/parameter-properties': 'error',
254
-
255
- 'no-redeclare': 'off',
256
- '@typescript-eslint/no-redeclare': 'error',
257
-
258
- '@typescript-eslint/no-require-imports': 'error',
259
-
260
- 'no-shadow': 'off',
261
- '@typescript-eslint/no-shadow': 'error',
262
-
263
- '@typescript-eslint/no-throw-literal': 'error',
264
-
265
- 'no-trailing-spaces': 'warn',
266
-
267
- 'no-undef-init': 'warn',
268
-
269
- '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
270
-
271
- '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
272
-
273
- '@typescript-eslint/no-unsafe-assignment': 'warn',
274
-
275
- '@typescript-eslint/no-unsafe-call': 'warn',
276
-
277
- 'no-unused-expressions': 'off',
278
- '@typescript-eslint/no-unused-expressions': 'warn',
279
-
280
- '@typescript-eslint/no-unused-vars': [
281
- 'warn',
282
- {
283
- ignoreRestSiblings: true,
284
- argsIgnorePattern: '^_',
285
- },
286
- ],
287
-
288
- '@typescript-eslint/no-use-before-define': 'error',
289
-
290
- 'no-var': 'error',
291
-
292
- '@typescript-eslint/non-nullable-type-assertion-style': 'warn',
293
-
294
- 'object-curly-spacing': 'off',
295
- '@typescript-eslint/object-curly-spacing': ['warn', 'always'],
296
-
297
- '@typescript-eslint/prefer-includes': 'warn',
298
-
299
- 'prefer-const': 'error',
300
-
301
- '@typescript-eslint/prefer-nullish-coalescing': 'warn',
302
-
303
- '@typescript-eslint/prefer-optional-chain': 'warn',
304
-
305
- '@typescript-eslint/prefer-string-starts-ends-with': 'warn',
306
-
307
- '@typescript-eslint/prefer-ts-expect-error': 'warn',
308
-
309
- '@typescript-eslint/promise-function-async': [
310
- 'error',
311
- {
312
- checkArrowFunctions: false,
313
- },
314
- ],
315
-
316
- 'quote-props': ['warn', 'as-needed'],
317
-
318
- 'quotes': 'off',
319
- '@typescript-eslint/quotes': [
320
- 'error',
321
- 'single',
322
- {
323
- avoidEscape: true,
324
- allowTemplateLiterals: true,
325
- },
326
- ],
327
-
328
- 'radix': 'warn',
329
-
330
- '@typescript-eslint/restrict-plus-operands': [
331
- 'error',
332
- {
333
- allowAny: true,
334
- },
335
- ],
336
-
337
- 'no-return-await': 'off',
338
- '@typescript-eslint/return-await': 'warn',
339
-
340
- 'semi': 'off',
341
- '@typescript-eslint/semi': [
342
- 'warn',
343
- 'always',
344
- {
345
- omitLastInOneLineBlock: false,
346
- },
347
- ],
348
-
349
- 'semi-style': 'warn',
350
-
351
- 'sort-imports': [
352
- 'warn',
353
- {
354
- ignoreCase: true,
355
- ignoreDeclarationSort: true,
356
- },
357
- ],
358
-
359
- 'space-before-blocks': 'warn',
360
-
361
- 'space-before-function-paren': 'off',
362
- '@typescript-eslint/space-before-function-paren': 'warn',
363
-
364
- 'space-infix-ops': 'off',
365
- '@typescript-eslint/space-infix-ops': [
366
- 'error',
367
- {
368
- int32Hint: false,
369
- },
370
- ],
371
-
372
- 'spaced-comment': [
373
- 'warn',
374
- 'always',
375
- {
376
- exceptions: ['-', '+', '*'],
377
- line: {
378
- markers: ['/'],
379
- },
380
- block: {
381
- balanced: true,
382
- },
383
- },
384
- ],
385
-
386
- '@typescript-eslint/switch-exhaustiveness-check': 'warn',
387
-
388
- '@typescript-eslint/type-annotation-spacing': 'warn',
389
-
390
- '@typescript-eslint/unified-signatures': 'warn',
391
-
392
- 'yoda': 'warn',
393
- },
394
-
395
- };