@hypersolid-dev/eslint-config 0.1.1 → 0.1.2
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/CHANGELOG.md +6 -0
- package/dist/shared.js +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.1.2](https://dev.azure.com/wearetriple/Triple%20-%20Webteam/_git/eslint-config-hypersolid/branchCompare?baseVersion=GTv0.1.1&targetVersion=GTv0.1.2) (2026-11-06)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **react:** disable [@eslint-react](https://dev.azure.com/eslint-react) rules that duplicate react-hooks ([08dda48](https://dev.azure.com/wearetriple/Triple%20-%20Webteam/_git/eslint-config-hypersolid/commit/08dda488b0a8e0d8eca9d06f33439b66b11c5afc))
|
|
6
|
+
|
|
1
7
|
## [0.1.1](https://dev.azure.com/wearetriple/Triple%20-%20Webteam/_git/eslint-config-hypersolid/branchCompare?baseVersion=GTv0.1.0&targetVersion=GTv0.1.1) (2026-11-06)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/shared.js
CHANGED
|
@@ -32,8 +32,6 @@ export function reactConfigs() {
|
|
|
32
32
|
...scopeToCode([
|
|
33
33
|
// React correctness for TypeScript projects. Bad: `this.state.count = 1`, `<li>` in a `.map()` without `key`.
|
|
34
34
|
eslintReact.configs['recommended-typescript'],
|
|
35
|
-
// Turns off @eslint-react's own hooks rules so react-hooks (below) is the one source for them.
|
|
36
|
-
eslintReact.configs['disable-conflict-eslint-plugin-react-hooks'],
|
|
37
35
|
// The official hooks rules plus the React Compiler checks. Bad: `if (isOpen) useEffect(…)`, a missing effect dependency.
|
|
38
36
|
reactHooks.configs.flat['recommended-latest'],
|
|
39
37
|
]),
|
|
@@ -42,6 +40,24 @@ export function reactConfigs() {
|
|
|
42
40
|
files: CODE_FILES,
|
|
43
41
|
languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } },
|
|
44
42
|
rules: {
|
|
43
|
+
// Off: react-hooks/exhaustive-deps reports it. Bad: `useEffect(() => log(id), [])` reported twice.
|
|
44
|
+
'@eslint-react/exhaustive-deps': 'off',
|
|
45
|
+
// Off: react-hooks/rules-of-hooks reports it. Bad: `if (isOpen) useEffect(…)` reported twice.
|
|
46
|
+
'@eslint-react/rules-of-hooks': 'off',
|
|
47
|
+
// Off: react-hooks/error-boundaries reports it. Bad: `try { return <Child /> } catch {…}` reported twice.
|
|
48
|
+
'@eslint-react/error-boundaries': 'off',
|
|
49
|
+
// Off: react-hooks/purity reports it. Bad: `const id = Math.random()` in render reported twice.
|
|
50
|
+
'@eslint-react/purity': 'off',
|
|
51
|
+
// Off: react-hooks/set-state-in-effect reports it. Bad: `useEffect(() => setCount(1))` reported twice.
|
|
52
|
+
'@eslint-react/set-state-in-effect': 'off',
|
|
53
|
+
// Off: react-hooks/set-state-in-render reports it. Bad: `setCount(1)` in the component body reported twice.
|
|
54
|
+
'@eslint-react/set-state-in-render': 'off',
|
|
55
|
+
// Off: react-hooks/static-components reports it. Bad: a component created during render reported twice.
|
|
56
|
+
'@eslint-react/static-components': 'off',
|
|
57
|
+
// Off: react-hooks/unsupported-syntax reports it. Bad: `eval(code)` in a component reported twice.
|
|
58
|
+
'@eslint-react/unsupported-syntax': 'off',
|
|
59
|
+
// Off: react-hooks/use-memo reports it. Bad: `useMemo(async () => …)` reported twice.
|
|
60
|
+
'@eslint-react/use-memo': 'off',
|
|
45
61
|
// A component defined inside another remounts on every render. Bad: `function List() { function Row() {…} return <Row />; }`.
|
|
46
62
|
'@eslint-react/no-nested-component-definitions': 'error',
|
|
47
63
|
// List items need a `key`. Bad: `items.map((item) => <Row item={item} />)`.
|