@open-turo/eslint-config-react 15.0.0-pr-320.3.1.1 → 15.0.0-pr-320.5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs
CHANGED
|
@@ -13,8 +13,8 @@ const tseslint = require("typescript-eslint");
|
|
|
13
13
|
* @param {object} options.turo ESLing configuration options for open-turo/eslint-config-typescript. See their documentation for available options.
|
|
14
14
|
* @returns Configuration Array
|
|
15
15
|
*/
|
|
16
|
-
module.exports = (options = {})
|
|
17
|
-
tseslint.config(
|
|
16
|
+
module.exports = function config(options = {}) {
|
|
17
|
+
return tseslint.config(
|
|
18
18
|
{
|
|
19
19
|
extends: turoConfig({
|
|
20
20
|
...options.turo,
|
|
@@ -24,7 +24,8 @@ module.exports = (options = {}) =>
|
|
|
24
24
|
"@testing-library/react",
|
|
25
25
|
"@testing-library/user-event",
|
|
26
26
|
"nock",
|
|
27
|
-
|
|
27
|
+
...(options.turo?.allowModules ?? []),
|
|
28
|
+
],
|
|
28
29
|
}),
|
|
29
30
|
rules: {
|
|
30
31
|
/*
|
|
@@ -45,6 +46,20 @@ module.exports = (options = {}) =>
|
|
|
45
46
|
"sonarjs/no-unstable-nested-components": "off",
|
|
46
47
|
// Allow file names to match a component name
|
|
47
48
|
"unicorn/filename-case": "off",
|
|
49
|
+
/**
|
|
50
|
+
* Prescriptive rule about only using `undefined`, never `null`, to avoid `null`-specific errors.
|
|
51
|
+
* Not compatible with React because `null` is a valid JSX return.
|
|
52
|
+
*/
|
|
53
|
+
"unicorn/no-null": 0,
|
|
54
|
+
// Allow common React abbreviations
|
|
55
|
+
"unicorn/prevent-abbreviations": [
|
|
56
|
+
"error",
|
|
57
|
+
{
|
|
58
|
+
replacements: {
|
|
59
|
+
props: false,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
48
63
|
},
|
|
49
64
|
},
|
|
50
65
|
{
|
|
@@ -110,3 +125,4 @@ module.exports = (options = {}) =>
|
|
|
110
125
|
},
|
|
111
126
|
},
|
|
112
127
|
);
|
|
128
|
+
};
|
|
Binary file
|
package/package.json
CHANGED
package/recommended.cjs
CHANGED
|
@@ -86,6 +86,20 @@ module.exports = {
|
|
|
86
86
|
"sonarjs/no-unstable-nested-components": "off",
|
|
87
87
|
// Allow file names to match a component name
|
|
88
88
|
"unicorn/filename-case": "off",
|
|
89
|
+
/**
|
|
90
|
+
* Prescriptive rule about only using `undefined`, never `null`, to avoid `null`-specific errors.
|
|
91
|
+
* Not compatible with React because `null` is a valid JSX return.
|
|
92
|
+
*/
|
|
93
|
+
"unicorn/no-null": 0,
|
|
94
|
+
// Allow common React abbreviations
|
|
95
|
+
"unicorn/prevent-abbreviations": [
|
|
96
|
+
"error",
|
|
97
|
+
{
|
|
98
|
+
replacements: {
|
|
99
|
+
props: false,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
],
|
|
89
103
|
},
|
|
90
104
|
settings: {
|
|
91
105
|
react: {
|
|
Binary file
|