-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
eslint.config.js
59 lines (58 loc) · 1.8 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const eslintJs = require("@eslint/js");
const eslintPluginReact = require("eslint-plugin-react");
const globals = require("globals");
const typescriptEslint = require("typescript-eslint");
module.exports = [
eslintJs.configs.recommended,
typescriptEslint.configs.eslintRecommended,
{
settings: {
react: {
version: "18.3.1",
},
},
...eslintPluginReact.configs.flat.recommended,
},
...typescriptEslint.configs.strictTypeChecked,
...typescriptEslint.configs.stylisticTypeChecked,
{
name: "react-to-print/base",
files: [
"**/*.ts",
"**/*.tsx",
],
languageOptions: {
ecmaVersion: 5,
globals: {
...globals.browser,
},
parser: typescriptEslint.parser,
parserOptions: {
project: "tsconfig.json",
projectService: true,
},
sourceType: "module",
},
linterOptions: {
reportUnusedDisableDirectives: "error",
},
plugins: {
"@typescript-eslint": typescriptEslint.plugin,
},
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/restrict-template-expressions": ["error", {
allowNumber: true,
}],
"max-len": ["error", {
code: 120,
ignoreComments: true,
ignoreStrings: true,
}],
},
}
];