This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
100 lines (78 loc) · 1.86 KB
/
.eslintrc.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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/** @type { import("eslint/rules").ESLintRules } */
var rulesFromESLint = {
// https://eslint.org/docs/rules
"indent": [
"warn",
"tab",
{
SwitchCase: 1,
},
],
"max-len": [
"error",
{
code: 100,
tabWidth: 4,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
},
],
"quotes": ["warn", "double", { avoidEscape: true }],
"no-console": ["warn"],
"no-alert": ["error"],
"no-debugger": ["error"],
};
var rulesFromPlugins = {
//
};
/** @type { import("eslint").Linter.Config } */
module.exports = {
extends: [
// https://github.com/eslint/eslint/blob/master/conf/eslint-recommended.js
"eslint:recommended",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.ts
"plugin:@typescript-eslint/recommended",
// https://github.com/nodesecurity/eslint-plugin-security
"plugin:security/recommended",
// https://github.com/xjamundx/eslint-plugin-promise
"plugin:promise/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: 2020,
},
plugins: [
// https://github.com/typescript-eslint/typescript-eslint
"@typescript-eslint",
// https://github.com/nodesecurity/eslint-plugin-security
"security",
// https://github.com/xjamundx/eslint-plugin-promise
"promise",
// https://github.com/BenoitZugmeyer/eslint-plugin-html
"html",
// https://github.com/sveltejs/eslint-plugin-svelte3
"svelte3",
],
overrides: [
{
files: ["*.svelte"],
processor: "svelte3/svelte3",
},
],
env: {
es2020: true,
node: true,
},
rules: {
...rulesFromESLint,
...rulesFromPlugins,
},
settings: {
// https://github.com/sveltejs/eslint-plugin-svelte3#configuration
"svelte3/ignore-styles": () => true,
"svelte3/typescript": require("typescript"),
},
};