@forthtilliath/eslint-config 0.6.0 → 0.7.0
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/dist/react.d.ts.map +1 -1
- package/dist/react.js +25 -0
- package/package.json +2 -2
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,0FAHW,OAAO,WAAW,EAAE,iBAAiB,GAAG,kBAAkB,GACxD,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAwF5C;AAED;;;;8CAI8C;AAC9C,0BADU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CACK"}
|
package/dist/react.js
CHANGED
|
@@ -16,6 +16,23 @@ import { createBaseConfig, createNamingConventionRule } from "./base.js";
|
|
|
16
16
|
* @type {string[]}
|
|
17
17
|
*/
|
|
18
18
|
const TEST_FILE_GLOBS = ["**/*.{test,spec}.{ts,tsx,js,jsx}"];
|
|
19
|
+
/**
|
|
20
|
+
* eslint-plugin-react-hooks rules that @eslint-react also implements, under
|
|
21
|
+
* the same name. Only the @eslint-react version is kept (see the rules block
|
|
22
|
+
* below); `src/nextjs.test.js` fails if a new overlap appears.
|
|
23
|
+
* @type {string[]}
|
|
24
|
+
*/
|
|
25
|
+
const RULES_COVERED_BY_ESLINT_REACT = [
|
|
26
|
+
"rules-of-hooks",
|
|
27
|
+
"exhaustive-deps",
|
|
28
|
+
"static-components",
|
|
29
|
+
"use-memo",
|
|
30
|
+
"set-state-in-effect",
|
|
31
|
+
"error-boundaries",
|
|
32
|
+
"purity",
|
|
33
|
+
"set-state-in-render",
|
|
34
|
+
"unsupported-syntax",
|
|
35
|
+
];
|
|
19
36
|
/**
|
|
20
37
|
* @typedef {object} ReactConfigOptions
|
|
21
38
|
* @property {boolean} [a11y=true] - Enable eslint-plugin-jsx-a11y's
|
|
@@ -79,6 +96,14 @@ export function createReactConfig({ a11y = true, i18n = false, testingLibrary =
|
|
|
79
96
|
settings: { react: { version: "19" } },
|
|
80
97
|
rules: {
|
|
81
98
|
...pluginReactHooks.configs.recommended.rules,
|
|
99
|
+
// Already covered by @eslint-react's recommended-type-checked preset
|
|
100
|
+
// (sometimes more thoroughly: its `purity` flags `new Date()`, the
|
|
101
|
+
// react-hooks one doesn't). Left on, every problem is reported twice
|
|
102
|
+
// and every disable comment has to name both plugins.
|
|
103
|
+
...Object.fromEntries(RULES_COVERED_BY_ESLINT_REACT.map((rule) => [
|
|
104
|
+
`react-hooks/${rule}`,
|
|
105
|
+
"off",
|
|
106
|
+
])),
|
|
82
107
|
// React scope no longer necessary with new JSX transform.
|
|
83
108
|
"react/react-in-jsx-scope": "off",
|
|
84
109
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forthtilliath/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"rxjs": "^7.8.0",
|
|
51
51
|
"typescript": "^5.9.3",
|
|
52
52
|
"vitest": "^4.1.10",
|
|
53
|
-
"@forthtilliath/typescript-config": "0.1.
|
|
53
|
+
"@forthtilliath/typescript-config": "0.1.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"dev": "tsc --watch -p tsconfig.build.json",
|