-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.mjs
More file actions
66 lines (65 loc) · 2.22 KB
/
Copy patheslint.config.mjs
File metadata and controls
66 lines (65 loc) · 2.22 KB
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
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import globals from 'globals';
export default [
{
files: ['src/**/*.ts', 'test/**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module'
},
globals: {
...globals.node,
...globals.jest
}
},
plugins: {
'@typescript-eslint': tseslint
},
rules: {
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error', { before: false, after: true }],
'arrow-spacing': ['error', { before: true, after: true }],
'curly': ['error', 'all'],
'eqeqeq': ['error', 'smart'],
'guard-for-in': 'error',
'indent': ['error', 2, { SwitchCase: 1 }],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'keyword-spacing': ['error', { before: true, after: true }],
'no-caller': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', { max: 5, maxBOF: 0 }],
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'no-unreachable': 'error',
'no-const-assign': 'error',
'object-shorthand': 'error',
'no-useless-rename': 'error',
'require-await': 'error',
'prefer-const': ['error', { destructuring: 'all' }],
'eol-last': ['error', 'never'],
'no-var': 'error',
'no-dupe-keys': 'error',
'object-curly-spacing': ['error', 'always'],
'one-var': ['error', 'never'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'always'],
'space-infix-ops': 'error',
'space-in-parens': ['error', 'never'],
'spaced-comment': ['error', 'always'],
'template-curly-spacing': ['error', 'never'],
'no-whitespace-before-property': 'error',
'quote-props': ['error', 'as-needed'],
'quotes': ['error', 'single'],
'semi': 'error',
'no-extra-semi': 'error',
'semi-spacing': 'error',
'prefer-template': 'error',
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'error'
}
}
];