Skip to content

Commit 557d769

Browse files
committed
Eslint config update
1 parent 45a4f3a commit 557d769

1 file changed

Lines changed: 58 additions & 58 deletions

File tree

eslint.config.cjs

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,64 @@ const tsPlugin = require('@typescript-eslint/eslint-plugin')
33
const unicorn = require('eslint-plugin-unicorn')
44
const importPlugin = require('eslint-plugin-import')
55

6-
module.exports = js.configs.recommended
7-
8-
module.exports = {
9-
...js.configs.recommended,
10-
plugins: {
11-
'@typescript-eslint': tsPlugin,
12-
unicorn,
13-
import: importPlugin,
14-
},
15-
languageOptions: {
16-
ecmaVersion: 2020,
17-
sourceType: 'module',
18-
},
19-
rules: {
20-
quotes: ['error', 'single', { avoidEscape: true }],
21-
camelcase: ['error', { properties: 'never' }],
22-
semi: ['error', 'never'],
23-
eqeqeq: ['error', 'always'],
24-
'prefer-const': 'error',
25-
'no-multiple-empty-lines': [2, { max: 1, maxEOF: 1 }],
26-
'array-bracket-spacing': ['error', 'never'],
27-
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
28-
'comma-spacing': ['error', { before: false, after: true }],
29-
'no-lonely-if': 'error',
30-
'dot-notation': 'error',
31-
'no-else-return': 'error',
32-
'no-tabs': 'error',
33-
'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false }],
34-
'no-var': 'error',
35-
'unicode-bom': ['error', 'never'],
36-
curly: ['error', 'all'],
37-
'object-curly-spacing': ['error', 'always'],
38-
'keyword-spacing': ['error'],
39-
'require-atomic-updates': 0,
40-
'linebreak-style': ['error', 'unix'],
41-
'unicorn/prefer-node-protocol': ['error'],
42-
'unicorn/template-indent': ['error'],
43-
'import/extensions': ['error', 'ignorePackages'],
44-
'no-restricted-syntax': ['error', 'IfStatement > ExpressionStatement > AssignmentExpression'],
45-
'unicorn/prefer-ternary': 'error',
6+
module.exports = [
7+
{
8+
...js.configs.recommended,
9+
plugins: {
10+
unicorn,
11+
import: importPlugin,
12+
},
13+
languageOptions: {
14+
ecmaVersion: 2020,
15+
sourceType: 'module',
16+
},
17+
rules: {
18+
quotes: ['error', 'single', { avoidEscape: true }],
19+
camelcase: ['error', { properties: 'never' }],
20+
semi: ['error', 'never'],
21+
eqeqeq: ['error', 'always'],
22+
'prefer-const': 'error',
23+
'no-multiple-empty-lines': [2, { max: 1, maxEOF: 1 }],
24+
'array-bracket-spacing': ['error', 'never'],
25+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
26+
'comma-spacing': ['error', { before: false, after: true }],
27+
'no-lonely-if': 'error',
28+
'dot-notation': 'error',
29+
'no-else-return': 'error',
30+
'no-tabs': 'error',
31+
'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false }],
32+
'no-var': 'error',
33+
'unicode-bom': ['error', 'never'],
34+
curly: ['error', 'all'],
35+
'object-curly-spacing': ['error', 'always'],
36+
'keyword-spacing': ['error'],
37+
'require-atomic-updates': 0,
38+
'linebreak-style': ['error', 'unix'],
39+
'unicorn/prefer-node-protocol': ['error'],
40+
'unicorn/template-indent': ['error'],
41+
'import/extensions': ['error', 'ignorePackages'],
42+
'no-restricted-syntax': ['error', 'IfStatement > ExpressionStatement > AssignmentExpression'],
43+
'unicorn/prefer-ternary': 'error',
44+
},
4645
},
47-
overrides: [
48-
{
49-
files: ['**/*.ts'],
50-
parser: '@typescript-eslint/parser',
51-
rules: {
52-
'no-unused-vars': 'off',
53-
'@typescript-eslint/no-unused-vars': 'error',
54-
'@typescript-eslint/consistent-type-imports': 'error',
55-
'no-undef': 'off',
56-
'no-redeclare': 'off',
57-
},
46+
{
47+
files: ['**/*.ts'],
48+
plugins: {
49+
'@typescript-eslint': tsPlugin,
50+
},
51+
parser: '@typescript-eslint/parser',
52+
rules: {
53+
'no-unused-vars': 'off',
54+
'@typescript-eslint/no-unused-vars': 'error',
55+
'@typescript-eslint/consistent-type-imports': 'error',
56+
'no-undef': 'off',
57+
'no-redeclare': 'off',
5858
},
59-
{
60-
files: ['**/*.test.ts'],
61-
rules: {
62-
'dot-notation': 'off',
63-
},
59+
},
60+
{
61+
files: ['**/*.test.ts'],
62+
rules: {
63+
'dot-notation': 'off',
6464
},
65-
],
66-
}
65+
},
66+
]

0 commit comments

Comments
 (0)