-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.js
86 lines (81 loc) · 1.94 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import jsConfigs from '@eslint/js';
import typescriptParser from '@typescript-eslint/parser';
import svelteParser from 'svelte-eslint-parser';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
export default [
jsConfigs.configs.recommended,
{
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
extraFileExtensions: ['.svelte']
},
globals: {
browser: true,
es2017: true,
node: true,
console: 'readonly'
}
},
ignores: [
'node_modules/',
'build/',
'.svelte-kit/',
'.svelte-kit/output/',
'.env',
'package-lock.json'
],
rules: {
'@typescript-eslint/require-await': 'off',
'prettier/prettier': 'error',
'no-sparse-arrays': 'off',
'no-undef': 'off',
'no-useless-escape': 'off',
'no-empty': 'off',
'no-constant-binary-expression': 'off',
'no-unused-vars': 'off',
'no-constant-condition': 'off',
'no-cond-assign': 'off',
'no-control-regex': 'off',
'no-case-declarations': 'off',
'no-self-assign': 'off',
'no-async-promise-executor': 'off',
'no-fallthrough': 'off',
'no-prototype-builtins': 'off',
'no-redeclare': 'off',
'no-extra-boolean-cast': 'off',
'no-misleading-character-class': 'off',
'no-unused-disable': 'off',
'no-unused-disable-directive': 'off'
},
plugins: {
prettier: eslintPluginPrettier,
'@typescript-eslint': typescriptEslintPlugin
}
},
{
files: ['*.svelte'],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: typescriptParser
}
}
},
{
files: ['.svelte-kit/**'],
rules: {
'no-unused-vars': 'off',
'no-control-regex': 'off',
'no-fallthrough': 'off',
'no-unused-labels': 'off',
'no-warning-comments': 'off',
'no-unused-disable-directive': 'off'
}
},
eslintConfigPrettier
];