@dangee1705/eslint-config 0.2.1 → 0.3.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 +3 -0
- package/eslint.config.js +33 -28
- package/package.json +3 -2
package/README.md
ADDED
package/eslint.config.js
CHANGED
|
@@ -3,6 +3,7 @@ import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
|
3
3
|
import parser from '@typescript-eslint/parser';
|
|
4
4
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
5
|
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
|
+
import globals from 'globals';
|
|
6
7
|
|
|
7
8
|
/** @type {import('eslint').Linter.Config[]} */
|
|
8
9
|
export default [
|
|
@@ -14,6 +15,10 @@ export default [
|
|
|
14
15
|
{
|
|
15
16
|
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
16
17
|
languageOptions: {
|
|
18
|
+
globals: {
|
|
19
|
+
...globals.browser,
|
|
20
|
+
...globals.node
|
|
21
|
+
},
|
|
17
22
|
parser,
|
|
18
23
|
parserOptions: {
|
|
19
24
|
allowJS: true,
|
|
@@ -90,12 +95,12 @@ export default [
|
|
|
90
95
|
'capitalized-comments': ['off'],
|
|
91
96
|
'class-methods-use-this': ['warn'],
|
|
92
97
|
'complexity': ['off'],
|
|
93
|
-
'consistent-return': ['
|
|
98
|
+
'consistent-return': ['off'],
|
|
94
99
|
'consistent-this': ['warn'],
|
|
95
100
|
'curly': ['warn', 'multi', 'consistent'],
|
|
96
101
|
'default-case': ['off'],
|
|
97
102
|
'default-case-last': ['off'],
|
|
98
|
-
'default-param-last': ['
|
|
103
|
+
'default-param-last': ['off'],
|
|
99
104
|
'dot-notation': ['off'],
|
|
100
105
|
'eqeqeq': ['warn'],
|
|
101
106
|
'func-name-matching': ['warn'],
|
|
@@ -110,11 +115,11 @@ export default [
|
|
|
110
115
|
'logical-assignment-operators': ['warn'],
|
|
111
116
|
'max-classes-per-file': ['off'],
|
|
112
117
|
'max-depth': ['warn', {'max': 4}],
|
|
113
|
-
'max-lines': ['
|
|
114
|
-
'max-lines-per-function': ['
|
|
118
|
+
'max-lines': ['off'],
|
|
119
|
+
'max-lines-per-function': ['off'],
|
|
115
120
|
'max-nested-callbacks': ['warn', {'max': 3}],
|
|
116
121
|
'max-params': ['warn', {'max': 5}],
|
|
117
|
-
'max-statements': ['
|
|
122
|
+
'max-statements': ['off'],
|
|
118
123
|
'new-cap': ['warn'],
|
|
119
124
|
'no-alert': ['off'],
|
|
120
125
|
'no-array-constructor': ['warn'],
|
|
@@ -177,7 +182,7 @@ export default [
|
|
|
177
182
|
'no-ternary': ['off'],
|
|
178
183
|
'no-throw-literal': ['warn'],
|
|
179
184
|
'no-undef-init': ['warn'],
|
|
180
|
-
'no-undefined': ['
|
|
185
|
+
'no-undefined': ['off'],
|
|
181
186
|
'no-underscore-dangle': ['warn'],
|
|
182
187
|
'no-unneeded-ternary': ['warn'],
|
|
183
188
|
'no-unused-expressions': ['warn'],
|
|
@@ -212,7 +217,7 @@ export default [
|
|
|
212
217
|
'prefer-template': ['warn'],
|
|
213
218
|
'radix': ['warn'],
|
|
214
219
|
'require-await': ['warn'],
|
|
215
|
-
'require-unicode-regexp': ['
|
|
220
|
+
'require-unicode-regexp': ['off'],
|
|
216
221
|
'require-yield': ['warn'],
|
|
217
222
|
'sort-imports': ['off'],
|
|
218
223
|
'sort-keys': ['off'],
|
|
@@ -226,9 +231,9 @@ export default [
|
|
|
226
231
|
'react-hooks/rules-of-hooks': 'error',
|
|
227
232
|
'react-hooks/exhaustive-deps': 'error',
|
|
228
233
|
|
|
229
|
-
'@stylistic/array-bracket-newline': ['warn',
|
|
234
|
+
'@stylistic/array-bracket-newline': ['warn', 'consistent'],
|
|
230
235
|
'@stylistic/array-bracket-spacing': ['warn', 'never'],
|
|
231
|
-
'@stylistic/array-element-newline': ['warn', 'consistent'],
|
|
236
|
+
'@stylistic/array-element-newline': ['warn', {'consistent': true, 'multiline': true}],
|
|
232
237
|
'@stylistic/arrow-parens': ['warn', 'as-needed'],
|
|
233
238
|
'@stylistic/arrow-spacing': ['warn'],
|
|
234
239
|
'@stylistic/block-spacing': ['warn', 'never'],
|
|
@@ -291,7 +296,7 @@ export default [
|
|
|
291
296
|
'@stylistic/multiline-comment-style': ['off'],
|
|
292
297
|
'@stylistic/multiline-ternary': ['warn', 'always-multiline'],
|
|
293
298
|
'@stylistic/new-parens': ['warn', 'always'],
|
|
294
|
-
'@stylistic/newline-per-chained-call': ['warn', {'ignoreChainWithDepth':
|
|
299
|
+
'@stylistic/newline-per-chained-call': ['warn', {'ignoreChainWithDepth': 3}],
|
|
295
300
|
'@stylistic/no-confusing-arrow': ['warn', {'allowParens': true}],
|
|
296
301
|
'@stylistic/no-extra-parens': ['warn', 'all', {'nestedBinaryExpressions': false, 'ignoreJSX': 'multi-line', 'enforceForArrowConditionals': false}],
|
|
297
302
|
'@stylistic/no-extra-semi': ['warn'],
|
|
@@ -338,24 +343,24 @@ export default [
|
|
|
338
343
|
'@stylistic/wrap-regex': ['off'],
|
|
339
344
|
'@stylistic/yield-star-spacing': ['warn', 'before'],
|
|
340
345
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
346
|
+
'@typescript-eslint/adjacent-overload-signatures': ['warn'],
|
|
347
|
+
'@typescript-eslint/array-type': ['warn', {'default': 'array'}],
|
|
348
|
+
'@typescript-eslint/await-thenable': ['warn'],
|
|
349
|
+
'@typescript-eslint/ban-ts-comment': ['off'],
|
|
350
|
+
'@typescript-eslint/ban-tslint-comment': ['error'],
|
|
351
|
+
'@typescript-eslint/class-literal-property-style': ['off'], // no preference afaik
|
|
352
|
+
'@typescript-eslint/class-methods-use-this': ['off'],
|
|
353
|
+
'@typescript-eslint/consistent-generic-constructors': ['warn', 'constructor'],
|
|
354
|
+
'@typescript-eslint/consistent-indexed-object-style': ['warn', 'index-signature'],
|
|
355
|
+
'@typescript-eslint/consistent-return': ['warn'],
|
|
356
|
+
'@typescript-eslint/consistent-type-assertions': ['warn', {'assertionStyle': 'as', 'objectLiteralTypeAssertions': 'allow'}],
|
|
357
|
+
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
|
|
358
|
+
'@typescript-eslint/consistent-type-exports': ['off'],
|
|
359
|
+
'@typescript-eslint/consistent-type-imports': ['off'],
|
|
360
|
+
'@typescript-eslint/default-param-last': ['error'],
|
|
361
|
+
'@typescript-eslint/dot-notation': ['off'],
|
|
362
|
+
'@typescript-eslint/explicit-function-return-type': ['off'],
|
|
363
|
+
'@typescript-eslint/explicit-member-accessibility': ['off'],
|
|
359
364
|
// '@typescript-eslint/explicit-module-boundary-types': ['warn'],
|
|
360
365
|
// '@typescript-eslint/init-declarations': ['warn'],
|
|
361
366
|
// '@typescript-eslint/max-params': ['warn'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dangee1705/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Dan Gee's ESLint Config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"@typescript-eslint/parser": "^8.29.0",
|
|
25
25
|
"eslint-plugin-react": "^7.37.4",
|
|
26
26
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
27
|
-
"eslint-plugin-simple-import-sort": "^12.1.1"
|
|
27
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
28
|
+
"globals": "^16.0.0"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"eslint": "^9.23.0"
|