forked from basics/rxjs-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
70 lines (68 loc) · 2.11 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import js from '@eslint/js';
// https://github.com/nickdeis/eslint-plugin-no-secrets
import noSecrets from 'eslint-plugin-no-secrets';
// https://github.com/azat-io/eslint-plugin-perfectionist
import perfectionist from 'eslint-plugin-perfectionist';
// https://github.com/prettier/eslint-plugin-prettier
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
// https://github.com/eslint-community/eslint-plugin-security
import eslintPluginSecurity from 'eslint-plugin-security';
// https://github.com/vitest-dev/eslint-plugin-vitest
import vitest from 'eslint-plugin-vitest';
import globals from 'globals';
import eslintIgnores from './eslint.ignores.js';
export default [
eslintPluginSecurity.configs.recommended,
eslintPluginPrettierRecommended,
js.configs.recommended,
{
files: ['**/*.js'],
ignores: eslintIgnores,
languageOptions: {
globals: {
...globals.browser,
expect: 'readonly',
global: 'readonly'
}
},
plugins: {
vitest,
'no-secrets': noSecrets,
perfectionist
},
rules: {
'block-spacing': 'error',
complexity: ['error', { max: 7 }],
camelcase: 'error',
// 'import/order': ['error', { groups: ['builtin', 'external', 'parent', 'sibling', 'index'] }],
'no-console': 'warn',
'no-debugger': 'warn',
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
'no-unused-vars': 'warn',
'no-secrets/no-secrets': 'error',
'perfectionist/sort-imports': [
'error',
{
type: 'alphabetical',
order: 'asc',
ignoreCase: true,
internalPattern: ['~/**'],
newlinesBetween: 'always',
maxLineLength: undefined,
groups: [
'type',
['builtin', 'external'],
'internal-type',
'internal',
['parent-type', 'sibling-type', 'index-type'],
['parent', 'sibling', 'index'],
'object',
'unknown'
],
customGroups: { type: {}, value: {} },
environment: 'node'
}
]
}
}
];