forked from Shopify/ruby-lsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
57 lines (51 loc) · 1.15 KB
/
eslint.config.mjs
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
import tsParser from "@typescript-eslint/parser";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import shopifyPlugin from "@shopify/eslint-plugin";
const config = [
...shopifyPlugin.configs.core,
...shopifyPlugin.configs.typescript,
...shopifyPlugin.configs.prettier,
{
languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",
parserOptions: {
project: "tsconfig.json",
},
},
plugins: {
"@typescript-eslint": tsPlugin,
},
settings: {
"import/resolver": {
typescript: {
project: "tsconfig.json",
},
},
},
"rules": {
"@typescript-eslint/no-floating-promises": "error",
"consistent-return": "off",
"no-warning-comments": "off",
"no-console": "warn",
"@shopify/no-debugger": "warn",
"no-template-curly-in-string": "warn",
"eqeqeq": "error",
"no-invalid-this": "error",
"no-lonely-if": "error",
"max-len": [
"error",
{
"code": 120
}
]
}
},
{
ignores: [
".vscode-test/*",
],
}
]
export default config;