forked from sveltejs/kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
65 lines (64 loc) · 1.72 KB
/
eslint.config.js
File metadata and controls
65 lines (64 loc) · 1.72 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import svelte_config from '@sveltejs/eslint-config';
import noRuntimeToExportsImports from './.eslint/no-runtime-to-exports-imports.js';
/** @type {import('eslint').Linter.Config[]} */
export default [
...svelte_config,
{
rules: {
'no-undef': 'off'
}
},
{
files: ['packages/kit/src/runtime/**/*.js'],
plugins: {
'kit-custom': {
rules: {
'no-runtime-to-exports-imports': noRuntimeToExportsImports
}
}
},
rules: {
'kit-custom/no-runtime-to-exports-imports': 'error'
}
},
{
ignores: [
'**/.svelte-kit',
'**/.wrangler',
'**/test-results',
'**/build',
'**/dist',
'**/.custom-out-dir',
'packages/adapter-*/files',
'packages/kit/src/core/config/fixtures/multiple', // dir contains svelte config with multiple extensions tripping eslint
'packages/package/test/fixtures/typescript-svelte-config/expected',
'packages/package/test/errors/**/*',
'packages/package/test/fixtures/**/*'
]
},
{
languageOptions: {
parserOptions: {
projectService: true
}
},
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/no-floating-promises': 'error'
},
ignores: [
'packages/adapter-cloudflare/test/apps/**/*',
'packages/adapter-netlify/test/apps/**/*',
'packages/adapter-node/rollup.config.js',
'packages/adapter-node/tests/smoke.spec_disabled.js',
'packages/adapter-static/test/apps/**/*',
'packages/kit/src/core/sync/create_manifest_data/test/samples/**/*',
'packages/kit/test/apps/**/*',
'packages/kit/test/build-errors/**/*',
'packages/kit/test/prerendering/**/*',
'packages/test-redirect-importer/index.js'
]
}
];