generated from permafrost-dev/typescript-project-skeleton-esbuild-jest
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
60 lines (60 loc) · 2.31 KB
/
.eslintrc.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
/** @type {import('eslint').Linter.Config } */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
env: {
browser: false,
commonjs: true,
jest: true,
node: true,
},
settings: {},
overrides: [
{ files: '*.d.ts', rules: { strict: [ 'error', 'never' ] } },
{
files: [ '.eslintrc.js', 'jest.config.js' ],
rules: {
'sort-keys': 'off',
'array-element-newline': [ 'warn', { multiline: true, minItems: 4 }],
},
},
],
plugins: [ 'jest' ],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/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',
'jest/no-disabled-tests': 'warn',
'jest/no-identical-title': 'error',
'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-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'array-bracket-newline': [ 'warn', { multiline: true, minItems: 4 }],
'array-bracket-spacing': [ 'warn', 'always', { objectsInArrays: false }],
'array-element-newline': [ 'warn', { multiline: true, minItems: 3 }],
'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/index.js', 'configure-package.js' ],
};