forked from Nick-Mazuk/eslint-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.js
47 lines (47 loc) · 1.33 KB
/
svelte.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
module.exports = {
env: {
browser: true,
commonjs: true,
es2020: true,
},
plugins: ['svelte3'],
extends: [require.resolve('./lib/base')],
rules: {},
ignorePatterns: ['public/build/'],
settings: {
'svelte3/typescript': require('typescript'),
},
parserOptions: {
extraFileExtensions: ['.svelte'],
},
overrides: [
{
files: ['*.svelte'],
rules: {
'init-declarations': 'off',
'no-undef-init': 'off',
'no-undefined': 'warn',
'no-use-before-define': 'off',
'import/first': 'off',
'import/no-mutable-exports': 'off',
'import/order': 'off',
'import/exports-last': 'off',
'prettier/prettier': 'off',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-unnecessary-condition': 'off',
'unicorn/no-useless-undefined': 'off',
},
processor: 'svelte3/svelte3',
},
{
files: ['$layout.svelte', '$error.svelte'],
rules: {
'unicorn/filename-case': 'off',
},
},
],
globals: {
svelte: 'readonly',
NodeJS: 'readonly',
},
}