generated from navneetsharmaui/sveltekit-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
82 lines (80 loc) · 2.1 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
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* jshint esversion: 11 */
const typescript = require('typescript');
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.svelte'],
sourceType: 'module',
ecmaVersion: 2020,
},
rules: {
semi: ['error', 'always'],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
'tsdoc/syntax': 'warn',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/prefer-default-export': 'off',
'import/no-mutable-exports': 0,
'no-labels': 0,
'no-restricted-syntax': 0,
},
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
rules: {
'import/no-unresolved': 'off',
'import/first': 'off',
'import/no-duplicates': 'off',
'import/no-mutable-exports': 'off',
'import/extensions': 'off',
'no-return-assign': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/restrict-template-expressions': [
'warn',
{
allowNumber: true,
allowBoolean: true,
allowNullish: true,
allowAny: true,
},
],
},
},
],
settings: {
'svelte3/typescript': () => typescript,
'svelte3/ignore-styles': () => true,
'import/extensions': ['.js', '.ts'],
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
typescript: {},
},
},
plugins: ['svelte3', '@typescript-eslint', 'eslint-plugin-tsdoc'],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:eslint-comments/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
ignorePatterns: ['*.cjs', 'static/*.js', 'svelte.config.js', 'scripts/js/*.ts'],
env: {
browser: true,
node: true,
es2020: true,
},
};