-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
42 lines (40 loc) · 1.05 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
import eslint from "@eslint/js";
import pluginTypeScript from "typescript-eslint";
import pluginPrettier from "eslint-plugin-prettier/recommended";
const sources = {
files: ["**/*.js", "**/*.ts", "**/*.d.ts"],
ignores: ["node_modules/*", "types/generated/*.d.ts"],
};
export default [
...pluginTypeScript.config(
{
...sources,
extends: [
eslint.configs.recommended,
...pluginTypeScript.configs.strictTypeChecked,
...pluginTypeScript.configs.stylisticTypeChecked,
],
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ["**/*.js"],
...pluginTypeScript.configs.disableTypeChecked,
},
),
{
...sources,
...pluginPrettier,
rules: {
"prettier/prettier": ["error", { printWidth: 120, tabWidth: 2 }],
},
},
];