-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (49 loc) · 1.54 KB
/
Copy patheslint.config.js
File metadata and controls
51 lines (49 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
46
47
48
49
50
import tsParser from '@typescript-eslint/parser';
import typescript from '@typescript-eslint/eslint-plugin';
import prettierPlugin from 'eslint-plugin-prettier';
export default [
{
files: ['**/*.{ts,tsx,js,jsx}'],
languageOptions: {
parser: tsParser, // ✅ parser module, not string
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true, // enable JSX
},
},
globals: {
window: 'readonly',
document: 'readonly',
},
},
plugins: {
'@typescript-eslint': typescript,
prettier: prettierPlugin,
},
rules: {
'max-len': 'off',
quotes: ['error', 'single'],
semi: ['error', 'always'],
indent: ['error', 4],
'arrow-parens': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'eol-last': ['error', 'always'],
'prettier/prettier': [
'error',
{
singleQuote: true,
tabWidth: 4,
semi: true,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'always',
endOfLine: 'lf',
printWidth: 100,
},
],
},
},
];