-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.mjs
41 lines (40 loc) · 1.02 KB
/
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
36
37
38
39
40
41
import globals from "globals"
import pluginJs from "@eslint/js"
import pluginReact from "eslint-plugin-react"
import jest from "eslint-plugin-jest"
export default [
{ files: ["**/*.{js,mjs,cjs,jsx}"] },
{
settings: {
react: {
version: "detect",
},
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parserOptions: { ecmaFeatures: { jsx: true } },
},
},
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
// ######### JEST ##########
// {
// files: ["**/*.test.js", "**/*.config.js", "__tests__/**", "test/__mocks__/**"],
// languageOptions: { sourceType: "commonjs" },
// },
{
files: ["__tests__/**", "**/*.test.js", "__mocks__/**"],
...jest.configs["flat/recommended"],
rules: {
...jest.configs["flat/recommended"].rules,
"jest/prefer-expect-assertions": "off",
"jest/no-disabled-tests": "off",
},
},
{
ignores: ["**/dist/*", "demo/build/*", "coverage/*"],
},
]