Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
45 lines (44 loc) · 1.54 KB
/
Copy patheslint.config.js
File metadata and controls
45 lines (44 loc) · 1.54 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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['node_modules/**', 'docs/**'],
},
{
files: ['src/**/*.ts', 'config/*.ts'],
languageOptions: {
parserOptions: {
project: './tsconfig.json',
},
},
rules: {
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
'block-spacing': 'error',
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { before: false, after: true }],
'curly': ['error', 'all'],
'eol-last': ['error', 'always'],
'keyword-spacing': ['error', { before: true, after: true }],
'max-len': ['error', { code: 120 }],
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-dupe-class-members': 'error',
'no-mixed-operators': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'off',
'object-curly-spacing': ['error', 'always'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'space-in-parens': ['error', 'never'],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
);