@hypersolid-dev/eslint-config 0.1.0 → 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 ADDED
@@ -0,0 +1,11 @@
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
+
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)
8
+
9
+ ### Bug Fixes
10
+
11
+ * **react-native:** disable unicorn rules that suggest APIs Hermes lacks ([b93eaa2](https://dev.azure.com/wearetriple/Triple%20-%20Webteam/_git/eslint-config-hypersolid/commit/b93eaa2812181a277b5a3c551338de320a808586)), closes [AB#5173](https://dev.azure.com/wearetriple/Triple%20-%20Webteam/_workitems/edit/5173)
package/README.md CHANGED
@@ -148,3 +148,7 @@ pnpm test
148
148
  ```
149
149
 
150
150
  `pnpm lint` builds the package and lints this repo with its own `base` preset. `pnpm test` runs fixture tests: for each preset, every invalid fixture in `test/fixtures/<preset>/invalid` must trigger the rule it's named after, and the valid fixtures must produce no messages. See [AGENTS.md](AGENTS.md) for conventions.
151
+
152
+ ## Versioning
153
+
154
+ Releases follow [semver](https://semver.org/) and are published from CI on every merge to `main`, with the version derived from [Conventional Commits](https://www.conventionalcommits.org/). A new or stricter rule is a major release, because it can fail your lint run. See [CHANGELOG.md](CHANGELOG.md) for what changed in each version.
@@ -26,6 +26,28 @@ export default function reactNative() {
26
26
  message: `\`${name}\` is a browser global, undefined on React Native: a local of that name was meant, or the value comes from a React Native API.`,
27
27
  })),
28
28
  ],
29
+ // Unicorn rules that push toward APIs the React Native runtime lacks (Hermes in RN 0.85 and RN's fetch/Blob/URL
30
+ // polyfills); the suggested fix crashes at runtime. Re-check when RN bumps Hermes.
31
+ // `toSorted` is missing from Hermes. Bad: `values.toSorted(compare)` suggested for `values.sort(compare)`.
32
+ 'unicorn/no-array-sort': 'off',
33
+ // Iterator helpers are missing from Hermes. Bad: `map.values().map(double).toArray()`.
34
+ 'unicorn/prefer-iterator-helpers': 'off',
35
+ // Iterator helpers are missing from Hermes. Bad: `iterator.map(double).toArray()` reordering.
36
+ 'unicorn/prefer-iterator-to-array-at-end': 'off',
37
+ // `Promise.withResolvers` is missing from Hermes. Bad: `const { promise, resolve } = Promise.withResolvers()`.
38
+ 'unicorn/prefer-promise-with-resolvers': 'off',
39
+ // `structuredClone` is not a React Native global. Bad: `structuredClone(value)`.
40
+ 'unicorn/prefer-structured-clone': 'off',
41
+ // React Native's `URL` has no `canParse`. Bad: `URL.canParse(value)`.
42
+ 'unicorn/prefer-url-can-parse': 'off',
43
+ // React Native's fetch polyfill has no static `Response.json`. Bad: `Response.json(data)`.
44
+ 'unicorn/prefer-response-static-json': 'off',
45
+ // React Native's `Blob` has no `text()`/`arrayBuffer()`; `FileReader` is the way. Bad: `await blob.text()`.
46
+ 'unicorn/prefer-blob-reading-methods': 'off',
47
+ // `EventTarget` is not a React Native global. Bad: `class Store extends EventTarget {}`.
48
+ 'unicorn/prefer-event-target': 'off',
49
+ // Metro emits CommonJS, so top-level await does not bundle. Bad: `await init();` at module scope.
50
+ 'unicorn/prefer-top-level-await': 'off',
29
51
  },
30
52
  },
31
53
  ]);
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} />)`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypersolid-dev/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Shared ESLint flat config for Hypersolid TypeScript projects",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -38,19 +38,31 @@
38
38
  }
39
39
  },
40
40
  "files": [
41
- "dist"
41
+ "dist",
42
+ "CHANGELOG.md"
42
43
  ],
43
44
  "engines": {
44
45
  "node": ">=24"
45
46
  },
47
+ "packageManager": "pnpm@10.32.1",
48
+ "scripts": {
49
+ "build": "tsc -p tsconfig.build.json",
50
+ "lint": "pnpm build && eslint .",
51
+ "test": "pnpm build && node --test 'test/*.test.ts'",
52
+ "prepublishOnly": "pnpm test"
53
+ },
46
54
  "peerDependencies": {
47
55
  "eslint": "^10.4.0",
48
56
  "typescript": ">=5.8 <6.1"
49
57
  },
50
58
  "devDependencies": {
59
+ "@semantic-release/changelog": "^7.0.0",
60
+ "@semantic-release/git": "^11.0.1",
51
61
  "@types/node": "^24.19.2",
52
62
  "@types/react": "^19.3.0",
63
+ "conventional-changelog-conventionalcommits": "^9.3.1",
53
64
  "eslint": "^10.14.0",
65
+ "semantic-release": "^25.0.9",
54
66
  "typescript": "^6.0.3"
55
67
  },
56
68
  "dependencies": {
@@ -69,10 +81,5 @@
69
81
  },
70
82
  "publishConfig": {
71
83
  "access": "public"
72
- },
73
- "scripts": {
74
- "build": "tsc -p tsconfig.build.json",
75
- "lint": "pnpm build && eslint .",
76
- "test": "pnpm build && node --test 'test/*.test.ts'"
77
84
  }
78
- }
85
+ }