-
-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy patheslint.config.js
More file actions
49 lines (47 loc) · 1.15 KB
/
eslint.config.js
File metadata and controls
49 lines (47 loc) · 1.15 KB
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
const tseslint = require("@typescript-eslint/eslint-plugin");
const tsparser = require("@typescript-eslint/parser");
const react = require("eslint-plugin-react");
module.exports = [
{
ignores: [
"node_modules/**",
"build/**",
"example/**",
"exampleManual/**",
"**/*.js",
"**/*.json",
],
},
{
files: ["lib/**/*.ts", "lib/**/*.tsx"],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
"@typescript-eslint": tseslint,
react: react,
},
settings: {
react: {
version: "detect",
},
},
rules: {
quotes: ["error", "double", { avoidEscape: true }],
"max-len": ["error", 120],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
"no-nested-ternary": "error",
"prefer-destructuring": "error",
camelcase: "error",
},
},
];