-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
32 lines (32 loc) · 1.21 KB
/
.eslintrc.cjs
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
const ignoreWarnings = new Set(['a11y-no-onchange', 'a11y-label-has-associated-control', 'a11y-mouse-events-have-key-events', 'a11y-mouse-events-have-key-events']);
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
plugins: ['prettier', 'svelte3', '@typescript-eslint'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/ignore-warnings': (w) => ignoreWarnings.has(w && w.code),
'svelte3/typescript': true,
'svelte3/ignore-styles': (attributes) => {
// https://github.com/sveltejs/eslint-plugin-svelte3/issues/10
return attributes && attributes.lang && attributes.lang !== 'css';
}
},
parserOptions: {
sourceType: 'module',
project: ['tsconfig.eslint.json'],
extraFileExtensions: ['.cjs'],
ecmaVersion: 2019
},
env: {
browser: true,
es2017: true,
node: true
},
rules: {
'prettier/prettier': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off'
}
};