@hypersolid-dev/eslint-config 0.1.0 → 0.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/CHANGELOG.md +5 -0
- package/README.md +4 -0
- package/dist/react-native.js +22 -0
- package/package.json +15 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## [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
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **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.
|
package/dist/react-native.js
CHANGED
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypersolid-dev/eslint-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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
|
+
}
|