forked from AnandChowdhary/update-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
60 lines (59 loc) · 1.95 KB
/
eslint.config.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
import js from '@eslint/js'
import globals from 'globals'
import tseslint from 'typescript-eslint'
import stylistic from '@stylistic/eslint-plugin'
export default tseslint.config(
{
ignores: ['dist']
},
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2022,
globals: globals.browser,
},
plugins: {
'@stylistic': stylistic,
},
rules: {
'array-bracket-spacing': 'warn',
'arrow-spacing': 'warn',
'block-spacing': 'warn',
'brace-style': 'warn',
'comma-dangle': ['warn', 'always-multiline'],
'comma-spacing': 'warn',
'computed-property-spacing': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'func-call-spacing': 'warn',
'generator-star-spacing': ['warn', 'after'],
'@stylistic/indent': ['warn', 'tab'],
'@stylistic/eol-last': ['warn', 'always'],
'key-spacing': 'warn',
'keyword-spacing': 'warn',
'@stylistic/member-delimiter-style': ['warn', { 'multiline': { 'delimiter': 'none' } }],
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'no-multi-spaces': 'warn',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-use-before-define': ['error', 'nofunc'],
'@typescript-eslint/no-var-requires': 'off',
'no-whitespace-before-property': 'warn',
'object-curly-spacing': ['warn', 'always'],
'rest-spread-spacing': 'warn',
'@stylistic/semi': ['warn', 'never'],
'semi-spacing': 'warn',
'space-before-blocks': 'warn',
'space-before-function-paren': ['warn', 'never'],
'space-in-parens': 'warn',
'space-infix-ops': 'warn',
'space-unary-ops': 'warn',
'switch-colon-spacing': 'warn',
'template-curly-spacing': 'warn',
'quotes': ['warn', 'single'],
'yield-star-spacing': 'warn',
},
}
)