forked from appliedblockchain/eslint-config
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsvelte.js
38 lines (37 loc) · 826 Bytes
/
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
import js from '@eslint/js'
import svelte from 'eslint-plugin-svelte'
import globals from 'globals'
import { warn, off } from './constants.js'
import { readFileSync } from 'node:fs'
import { join } from 'node:path'
/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...svelte.configs.recommended,
{
ignores: [
'**/.svelte-kit/',
'**/static/'
]
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: [ '**/*.svelte', '**/*.svelte.js' ],
languageOptions: {
parserOptions: {
svelteConfig: readFileSync(join(process.cwd(), 'svelte.config.js'), 'utf8')
}
},
rules: {
'svelte/require-each-key': warn,
'svelte/no-at-html-tags': off
}
}
]