-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
35 lines (35 loc) · 1.25 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
33
34
35
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['plugin:svelte/base', 'standard-with-typescript'],
plugins: ['@typescript-eslint'],
ignorePatterns: ['*.cjs', 'package/**/*', '*.config.js', '*.d.ts'],
overrides: [{ files: ['*.svelte'], parser: 'svelte-eslint-parser', parserOptions: { parser: '@typescript-eslint/parser' } }],
rules: {
'import/first': 'off',
'no-multiple-empty-lines': 'off',
'no-undef-init': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': 'off', // typescript does this better
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off', // not compatible with strictNullChecks disabled
'@typescript-eslint/return-await': ['error', 'always'],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/prefer-readonly': ['off']
},
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
extraFileExtensions: ['.svelte'],
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
};