-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path.eslintrc.ui.js
47 lines (46 loc) · 1.43 KB
/
.eslintrc.ui.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
const scaffold = require("./.eslintrc");
module.exports = {
...scaffold,
extends: [
...scaffold.extends,
"plugin:@microsoft/sdl/react", // Microsoft SDL React rules
"plugin:react/recommended",
"plugin:testing-library/react",
],
ignorePatterns: [...scaffold.ignorePatterns, "creevey.config.js"],
plugins: [...scaffold.plugins, "react", "react-hooks"],
rules: {
...scaffold.rules,
"react-hooks/exhaustive-deps": [
"warn",
{ additionalHooks: "^(useCallbackDelay|useCommands|useStateAsync)$" },
],
"react/sort-prop-types": [
"error",
{
callbacksLast: false,
ignoreCase: true,
requiredFirst: true,
sortShapeProp: true,
noSortAlphabetically: false,
},
],
"react/self-closing-comp": "error",
"react/jsx-boolean-value": "error",
"react/jsx-closing-bracket-location": "error",
"react/jsx-closing-tag-location": "error",
"react/jsx-curly-brace-presence": [
"warn",
{ props: "never", children: "never" },
],
"react/jsx-wrap-multilines": "error",
"react/jsx-uses-react": "off", //https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#eslint
"react/react-in-jsx-scope": "off", //https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#eslint
"testing-library/prefer-screen-queries": "off",
},
settings: {
react: {
version: "detect",
},
},
};