-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.cjs
47 lines (45 loc) · 1.27 KB
/
eslint.config.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
const tsPlugin = require("@typescript-eslint/eslint-plugin");
const tsParser = require("@typescript-eslint/parser");
const js = require("@eslint/js");
const importPlugin = require("eslint-plugin-import");
module.exports = Object.assign({}, js.configs.recommended, {
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": tsPlugin,
"import": importPlugin, // Add import plugin
},
ignores: ["node_modules/*"],
rules: Object.assign({}, tsPlugin.configs.rules, {
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
},
],
"import/order": [
"error",
{
"groups": [
["builtin", "external"],
["internal", "parent", "sibling", "index"]
],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
],
}),
});