-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy patheslint.config.js
More file actions
67 lines (66 loc) · 1.74 KB
/
Copy patheslint.config.js
File metadata and controls
67 lines (66 loc) · 1.74 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
const tseslint = require("@typescript-eslint/eslint-plugin");
const tsparser = require("@typescript-eslint/parser");
const prettierConfig = require("eslint-config-prettier");
const prettierPlugin = require("eslint-plugin-prettier");
/** @type {import('eslint').Linter.Config[]} */
module.exports = [
{
ignores: [
"example/**",
"lib/**",
"node_modules/**",
".vscode/**",
".idea/**",
".circleci/**",
],
},
{
files: ["**/*.{js,ts,tsx}"],
plugins: {
"@typescript-eslint": tseslint,
prettier: prettierPlugin,
},
languageOptions: {
parser: tsparser,
globals: {
__DEV__: true,
},
},
settings: {
react: {
pragma: "React",
version: "19.0",
},
},
rules: {
...prettierConfig.rules,
...prettierPlugin.configs.recommended.rules,
"no-undef": "off",
"no-shadow": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
args: "after-used",
},
],
},
},
{
files: ["**/*.test.js", "**/*.test.jsx"],
languageOptions: {
globals: {
afterAll: true,
afterEach: true,
beforeAll: true,
beforeEach: true,
describe: true,
expect: true,
it: true,
jest: true,
test: true,
},
},
},
];