-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
56 lines (56 loc) · 2.25 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
/** @type {import('eslint').Linter.Config } */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
env: {
browser: false,
commonjs: true,
node: 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', //['warn', { multiline: true, minItems: 6 }],
},
},
],
plugins: [],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:node/recommended'],
rules: {
'@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/*', 'configure-package.js'],
};