-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
35 lines (31 loc) · 948 Bytes
/
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
import tsEslint from "@typescript-eslint/eslint-plugin";
import parser from "@typescript-eslint/parser";
import globals from "globals";
const plugins = {
"@typescript-eslint": tsEslint,
};
const rules = tsEslint.configs["strict-type-checked"].rules;
const linterOptions = { reportUnusedDisableDirectives: true };
/** @type { import("eslint").Linter.FlatConfig[] } */
const config = [
{
files: ["src/**/*.{ts,tsx}"],
plugins,
rules: {
...rules,
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-non-null-assertion": "off",
},
linterOptions,
languageOptions: {
parser,
parserOptions: { project: "./tsconfig.json" },
globals: globals.browser,
},
},
];
export default config;