-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
52 lines (47 loc) · 1.39 KB
/
index.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
import rules from "./generated/rules.js"
import typeScriptParser from "@typescript-eslint/parser"
import typeScriptPlugin from "@typescript-eslint/eslint-plugin"
import jsdocPlugin from "eslint-plugin-jsdoc"
import jsxA11yPlugin from "eslint-plugin-jsx-a11y"
import nodePlugin from "eslint-plugin-n"
import reactPlugin from "eslint-plugin-react"
import reactHooksPlugin from "eslint-plugin-react-hooks"
import regexpPlugin from "eslint-plugin-regexp"
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort"
import unicornPlugin from "eslint-plugin-unicorn"
import unusedImportsPlugin from "eslint-plugin-unused-imports"
const plugins = {
"@typescript-eslint": typeScriptPlugin,
jsdoc: jsdocPlugin,
"jsx-a11y": jsxA11yPlugin,
n: nodePlugin,
react: reactPlugin,
"react-hooks": reactHooksPlugin,
regexp: regexpPlugin,
"simple-import-sort": simpleImportSortPlugin,
unicorn: unicornPlugin,
"unused-imports": unusedImportsPlugin
}
export const base = {
files: ["**/*.ts", "**/*.tsx", "**/*.mts"],
languageOptions: {
parser: typeScriptParser,
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
ecmaFeatures: { jsx: true },
ecmaVersion: "latest",
sourceType: "module",
project: `${process.cwd()}/tsconfig.json`
}
},
settings: {
react: {
version: "18.2"
}
},
plugins
}
export const main = {
...base,
rules
}