-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.eslintrc.cjs
42 lines (40 loc) · 1.25 KB
/
.eslintrc.cjs
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
// (C) 2023 GoodData Corporation
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["react-hooks", "prettier"],
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:import-esm/recommended",
],
rules: {
"react/prop-types": "off",
"import/order": [
1,
{
groups: ["builtin", "external", "parent", "sibling", "index"],
"newlines-between": "always",
},
],
"no-console": [2, { allow: ["warn", "error"] }],
},
parserOptions: { tsconfigRootDir: __dirname },
ignorePatterns: ["webpack.config.cjs", "vite.config.js", "scripts/refresh-md.cjs"],
settings: {
react: {
version: "detect",
},
"import/resolver": {
typescript: {}, // without this setting (incl. extra dependency: eslint-import-resolver-typescript) the import plugin does not work, and all imports are unresolved after upgrade to SDK 9
},
},
env: {
browser: true,
node: true,
},
};