-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.mjs
35 lines (34 loc) · 972 Bytes
/
eslint.config.mjs
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 eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import pluginPromise from 'eslint-plugin-promise'
import reactPlugin from 'eslint-plugin-react'
import barrelFiles from "eslint-plugin-barrel-files"
export default [
eslint.configs.recommended,
pluginPromise.configs['flat/recommended'],
...tseslint.configs.recommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat['jsx-runtime'],
{
languageOptions: {
...reactPlugin.configs.flat.recommended.languageOptions,
ecmaVersion: "latest",
sourceType: "module"
},
rules: {
"react/react-in-jsx-scope": "off",
"promise/prefer-await-to-then": "error"
}
},
{
plugins: {
"barrel-files": barrelFiles
},
rules: {
"barrel-files/avoid-barrel-files": 2,
"barrel-files/avoid-importing-barrel-files": 2,
"barrel-files/avoid-namespace-import": 2,
"barrel-files/avoid-re-export-all": 2
}
}
]