-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
73 lines (72 loc) · 2.06 KB
/
eslint.config.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
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginImportX from "eslint-plugin-import-x";
import { configs as eslintPluginLitConfigs } from "eslint-plugin-lit";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
extends: [
eslint.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
eslintConfigPrettier,
eslintPluginImportX.flatConfigs.recommended,
eslintPluginImportX.flatConfigs.typescript,
eslintPluginLitConfigs["flat/recommended"],
],
ignores: ["dist/*"],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.browser,
},
},
rules: {
"@typescript-eslint/explicit-function-return-type": [
"error",
{
allowExpressions: true,
},
],
"@typescript-eslint/explicit-member-accessibility": ["error", { overrides: { constructors: "off" } }],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-expressions": ["error", { allowShortCircuit: true, allowTernary: true }],
"import-x/no-default-export": "error",
"import-x/order": [
"error",
{
groups: [["builtin", "external"], ["internal", "parent", "sibling", "index"], ["type"]],
"newlines-between": "never",
pathGroups: [
{
pattern: "core",
group: "external",
position: "after",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"no-await-in-loop": "error",
"no-console": "error",
},
},
{
files: ["*.config.js"],
rules: {
"import-x/no-named-as-default-member": "off",
},
},
{
files: ["scripts/**/*"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"no-console": "off",
},
}
);