-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
43 lines (40 loc) · 1.31 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
/* eslint-disable @typescript-eslint/no-require-imports */
const typescriptEslintParser = require("@typescript-eslint/parser");
const prettierEslintConfig = require("eslint-plugin-prettier/recommended");
const typescriptEslintConfig = require("typescript-eslint");
const eslintImportPlugin = require("eslint-plugin-import");
module.exports = [
prettierEslintConfig,
...typescriptEslintConfig.configs.recommended,
eslintImportPlugin.flatConfigs.recommended,
{
files: ["**/*.ts"],
ignores: ["dist", "build", "node_modules"],
languageOptions: {
parser: typescriptEslintParser,
},
rules: {
"@typescript-eslint/array-type": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"import/no-duplicates": "warn",
"import/default": "warn",
"import/first": "warn",
"import/export": "error",
"prettier/prettier": [
"error",
{
tabWidth: 2,
semi: true,
singleQuote: true,
trailingComma: "none",
bracketSpacing: true,
arrowParens: "always",
endOfLine: "auto",
},
],
},
},
];