-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
65 lines (65 loc) · 2.46 KB
/
.eslintrc.cjs
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
/** @type {import('eslint').Linter.Config } */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
env: {
browser: true,
commonjs: true,
jest: true,
node: true,
es2022: true,
},
settings: {},
overrides: [
{ files: '*.d.ts', rules: { strict: ['error', 'never'] } },
{
files: ['.eslintrc.cjs', '.eslintrc.js', 'jest.config.js'],
rules: {
'sort-keys': 'off',
'array-element-newline': 'off',
},
},
],
plugins: [],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:node/recommended'],
rules: {
'@typescript-eslint/ban-types': 'off',
'no-async-promise-executor': 'off',
'node/no-unsupported-features/es-builtins': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 2 }],
'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'node/no-process-exit': 'off',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'array-bracket-newline': ['warn', { multiline: true, minItems: 6 }],
'array-bracket-spacing': ['warn', 'always', { objectsInArrays: false }],
'array-element-newline': ['warn', { multiline: true, minItems: 6 }],
eqeqeq: ['error', 'smart'],
indent: ['warn', 4, { SwitchCase: 1 }],
'no-eval': 'error',
'no-var': 'error',
'object-curly-newline': [
'warn',
{
ObjectExpression: { multiline: true, minProperties: 4 },
ObjectPattern: { multiline: true, minProperties: 4 },
ImportDeclaration: 'never',
},
],
},
ignorePatterns: ['dist/*', 'node_modules/*', '.vscode/*', '.cache/*', 'configure-package.js'],
};