-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.js
34 lines (33 loc) · 1.13 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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
files: ["src/**/*.ts", "src/**/*.tsx"],
ignores: ["src/**/*.d.ts"],
rules: {
"@/semi": 1,
"no-param-reassign": ["error", { props: false }],
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
"operator-assignment": ["error", "always"],
"no-empty": 2,
"no-multi-assign": 2,
"spaced-comment": ["warn", "always", { exceptions: ["*"] }],
"no-var": 2,
"@/keyword-spacing": 2,
"no-fallthrough": 2,
"@typescript-eslint/no-unused-vars": ["warn", { caughtErrors: "none" }],
quotes: ["error", "double"],
"arrow-body-style": ["error", "as-needed"],
"eol-last": ["warn", "always"],
"no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
"@typescript-eslint/no-unused-expressions": [
"error",
{ allowShortCircuit: true, allowTernary: true },
],
},
}
);