@ztd-me/eslint 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/README.md +8 -1
- package/dist/index.js +14 -4
- package/docs/pnpm-policy.md +4 -2
- package/docs/publishing.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,13 @@ Type-aware checking is on by default, using `tsconfig.json`. Supply an existing
|
|
|
45
45
|
|
|
46
46
|
The parser uses the explicit TS project, with `.vue` as an extra file extension and `vue-eslint-parser` as the SFC outer parser. Typed rules cover Vue scripts as well as TS and TSX. Vue template expressions use Vue rules and the custom array visitor; TypeScript rules do not type-check template expressions.
|
|
47
47
|
|
|
48
|
+
Since 0.1.2, the explicit project settings apply only to actual type-aware source files. Markdown TS/TSX
|
|
49
|
+
code fences and Astro's virtual TS snippets use the existing upstream syntax scope, without asking the
|
|
50
|
+
application TS config to include generated files such as `README.md/0_0.tsx`. Markdown markup,
|
|
51
|
+
TypeScript syntax, React semantics, array formatting and other applicable checks remain enabled.
|
|
52
|
+
Actual application files still require the selected strict project; files outside it fail rather than
|
|
53
|
+
receiving a syntax-only fallback. The same virtual-file boundary applies to typed Vitest rules.
|
|
54
|
+
|
|
48
55
|
For a JavaScript-only scope, use `typescript: false`. This turns off TypeScript parsing and rules; it does not lower JS complexity, length, or correctness standards. There is no syntax-only TypeScript or `strictTypes: false` mode. Run `tsc --noEmit` as a separate compiler gate; `exactOptionalPropertyTypes`, `noPropertyAccessFromIndexSignature`, and `useUnknownInCatchVariables` are also recommended compiler settings.
|
|
49
56
|
|
|
50
57
|
## Framework options
|
|
@@ -134,6 +141,6 @@ pnpm run check
|
|
|
134
141
|
|
|
135
142
|
The checks build JS/declarations, type-check the public API, self-lint source/tests/scripts, exercise real TS/React/Vue fixtures, check all numeric boundaries and all selected catalog options, and install/import/type-check an independently packed artifact with pnpm. Negative fixtures are checked by the test harness, not included in ordinary self-lint. The test modules have reasoned local exceptions for Node's asynchronous ESM setup and imports of the distribution being tested; safety and size limits remain active.
|
|
136
143
|
|
|
137
|
-
[Publishing instructions](docs/publishing.md) describe the stage-only GitHub workflow and the user-controlled promotion. Staging is not a public release. After promotion, run `node scripts/registry-smoke.mjs 0.1.
|
|
144
|
+
[Publishing instructions](docs/publishing.md) describe the stage-only GitHub workflow and the user-controlled promotion. Staging is not a public release. After promotion, run `node scripts/registry-smoke.mjs 0.1.2` to install the exact public version in a fresh pnpm project and verify imports, declarations and lint behavior. Registry installation follows pnpm's supply-chain policies; a policy rejection is a blocker, not permission to disable the policy.
|
|
138
145
|
|
|
139
146
|
The repository has not granted an open-source license; package metadata is `UNLICENSED` pending that separate decision.
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { typedRules } from './rules/typed.js';
|
|
|
12
12
|
import { vueA11yRules } from './rules/vue-a11y.js';
|
|
13
13
|
import { vueRules } from './rules/vue.js';
|
|
14
14
|
import { resolveTypeScript } from './typescript.js';
|
|
15
|
+
const typeAwareIgnores = ['**/*.md/**', '**/*.astro/*.ts'];
|
|
15
16
|
function shared(sfcFiles) {
|
|
16
17
|
return {
|
|
17
18
|
name: 'ztd/shared',
|
|
@@ -40,7 +41,7 @@ function shared(sfcFiles) {
|
|
|
40
41
|
},
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
function typed(files) {
|
|
44
|
+
function typed(files, parserOptions) {
|
|
44
45
|
return [
|
|
45
46
|
{
|
|
46
47
|
name: 'ztd/typescript-syntax',
|
|
@@ -59,7 +60,9 @@ function typed(files) {
|
|
|
59
60
|
{
|
|
60
61
|
name: 'ztd/typescript-typed',
|
|
61
62
|
files,
|
|
62
|
-
ignores:
|
|
63
|
+
ignores: typeAwareIgnores,
|
|
64
|
+
// antfu applies its general parserOptions to both parsers; keep project settings in this typed scope.
|
|
65
|
+
languageOptions: { parserOptions },
|
|
63
66
|
rules: {
|
|
64
67
|
...typedRules,
|
|
65
68
|
'require-await': 'off',
|
|
@@ -133,6 +136,7 @@ function vitest(enabled, tsFiles) {
|
|
|
133
136
|
configs.push({
|
|
134
137
|
name: 'ztd/vitest-typed',
|
|
135
138
|
files: tsFiles.flatMap(file => GLOB_TESTS.map(testFile => [file, testFile])),
|
|
139
|
+
ignores: typeAwareIgnores,
|
|
136
140
|
rules: { 'ts/unbound-method': 'off', 'test/unbound-method': [
|
|
137
141
|
'error',
|
|
138
142
|
{ ignoreStatic: false },
|
|
@@ -198,12 +202,18 @@ export async function createConfig(options = {}, ...localConfigs) {
|
|
|
198
202
|
shared(sfcFiles),
|
|
199
203
|
...react(enableReact),
|
|
200
204
|
...vue(enableVue),
|
|
201
|
-
...(
|
|
205
|
+
...(tsOptions === false ? [] : typed(tsFiles, tsOptions.parserOptions)),
|
|
202
206
|
...vitest(test, typescript === false ? [] : tsFiles),
|
|
203
207
|
];
|
|
204
208
|
return await antfu({
|
|
205
209
|
...base,
|
|
206
|
-
typescript: tsOptions === false
|
|
210
|
+
typescript: tsOptions === false
|
|
211
|
+
? false
|
|
212
|
+
: {
|
|
213
|
+
tsconfigPath: tsOptions.tsconfigPath,
|
|
214
|
+
filesTypeAware: tsFiles,
|
|
215
|
+
ignoresTypeAware: typeAwareIgnores,
|
|
216
|
+
},
|
|
207
217
|
react: antfuReact(enableReact, tsFiles),
|
|
208
218
|
vue: antfuVue(sfcFiles),
|
|
209
219
|
test,
|
package/docs/pnpm-policy.md
CHANGED
|
@@ -10,6 +10,8 @@ trustPolicy: no-downgrade
|
|
|
10
10
|
|
|
11
11
|
These inherited checks are separate from the 198-entry research catalog. They are intentional upstream defaults; this package does not silently disable them when a consumer fails lint. Changing a consumer's dependency policy requires that project's approval and native installation/build checks.
|
|
12
12
|
|
|
13
|
+
The user now approves tools verification and the three consumer projects to use `minimumReleaseAgeExclude: ['@ztd-me/*']` for frequent scope releases. Add this age-only selector to the existing list without removing unrelated gates or approved entries. `trustPolicy: no-downgrade`, package integrity and dependency-build restrictions remain active; there is no scope trust exclusion. The existing exact `semver@6.3.1` trust exception remains separate.
|
|
14
|
+
|
|
13
15
|
[`minimumReleaseAgeExcludePrune`](https://pnpm.io/settings/dependency-resolution#minimumreleaseageexcludeprune) was added in pnpm 11.22.0. It removes release-age exception entries that no longer match packages/versions in the lockfile. It retains an active package-wide exception, including `@ztd-me/eslint`, while that package remains installed; this does not automatically expire the exception after the age cutoff. Wildcard entries are retained. Older pnpm versions do not provide the pruning behavior merely because the YAML key is present.
|
|
14
16
|
|
|
15
17
|
[`trustPolicy: no-downgrade`](https://pnpm.io/settings/dependency-resolution#trustpolicy) was added in pnpm 10.21.0 and rejects a package release whose publishing trust drops below earlier releases. Trusted publishing ranks above provenance-only publishing, which ranks above publication without either. Release-age exceptions do not bypass this independent policy. Installation must check the actual dependency graph; switching a package from token publication to trusted publication can make a later token-only release a downgrade.
|
|
@@ -18,10 +20,10 @@ These inherited checks are separate from the 198-entry research catalog. They ar
|
|
|
18
20
|
|
|
19
21
|
Consumers using pnpm 10 must review a pnpm upgrade before relying on the pruning requirement. A pnpm 11 migration must preserve explicitly allowed dependency builds when converting `onlyBuiltDependencies` to `allowBuilds`; it must not broaden build permissions. Do not disable release-age/trust checks or add broad trust exclusions to get an installation through. A lint pass alone does not prove that the pinned package manager implements every setting.
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Existing exact semver trust exception
|
|
22
24
|
|
|
23
25
|
On 2026-10-02, enabling `no-downgrade` on the selected package graph rejected `semver@6.3.1`. Both 0.1.0 and the 0.1.1 framework patch depend on stable `eslint-plugin-react-hooks@7.1.1`, which requires `@babel/core:^7.24.4`. Resolved Babel core 7.29.7 and its compilation-target helper require `semver:^6.3.1`. Registry inspection found 27 eligible stable Babel 7 versions, all requiring that same semver range; 6.3.1 remains the latest 6.x version.
|
|
24
26
|
|
|
25
27
|
Semver 6.3.1 was published on 2023-07-10 without provenance, after provenance-bearing 7.5.4 on 2023-07-07. This meets pnpm's publication-date policy even though the major versions differ; the age exception for this ESLint package does not fix it. A policy failure is not proof of a compromised release, but it remains an installation blocker.
|
|
26
28
|
|
|
27
|
-
Babel 8 is outside the Hooks plugin's supported dependency range. Forcing Babel 8 or semver 7 through a cross-major override is not a supported package upgrade. A coherent upstream remedy is a compatible Babel 7 release using an accepted semver dependency, or stable React Hooks support for Babel 8, followed by a tested ESLint package release.
|
|
29
|
+
Babel 8 is outside the Hooks plugin's supported dependency range. Forcing Babel 8 or semver 7 through a cross-major override is not a supported package upgrade. The user-approved integration retains only `semver@6.3.1` as an exact trust exception. A coherent upstream remedy is a compatible Babel 7 release using an accepted semver dependency, or stable React Hooks support for Babel 8, followed by a tested ESLint package release. The `@ztd-me/*` age selector does not expand that trust exception.
|
package/docs/publishing.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`.github/workflows/publish-eslint.yml` verifies and stages `@ztd-me/eslint`. Every upload uses `pnpm stage publish`; the workflow never directly publishes or approves a stage. `NPM_TOKEN` has Read and write (stage only) rights, with Bypass 2FA disabled. The token is bound to `https://registry.npmjs.org` in the stage step only, kept in memory, and never printed. Installation/build/test/pack steps have no token.
|
|
4
4
|
|
|
5
|
-
The only trigger is a push to `main` affecting `packages/eslint-config
|
|
5
|
+
The only trigger is a push to `main` affecting `packages/eslint-config/**`, `.github/workflows/publish-eslint.yml` or the shared `scripts/npm-staging.mjs` guard. There is no manual trigger, temporary release branch, or authentication selector. Package versions are independent of the Go CLI's `v*` tags: review and merge an ESLint package version bump to request a release. Source changes without a version bump still run verification, but the existing version is skipped.
|
|
6
6
|
|
|
7
7
|
The verification jobs use a frozen pnpm lockfile on Node 22 and 24. The Node 24 job packs the tested package. A single staging job consumes that exact artifact and saves the npm stage response as a workflow artifact. Runs share one concurrency group without cancellation. Before upload, the script checks public registry metadata and the authenticated pending-stage list. Published or already-staged versions produce a skip receipt, preserving an existing stage ID. Registry/authentication errors and malformed responses fail before upload. The Actions run, source SHA, tarball checksum and stage ID are review evidence. Do not resubmit after an ambiguous timeout; inspect the existing stage before retrying.
|
|
8
8
|
|
|
@@ -38,4 +38,4 @@ After promotion, inspect the exact public registry version, then run:
|
|
|
38
38
|
node scripts/registry-smoke.mjs <promoted-version>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
This creates a fresh consumer, installs the exact registry version using pnpm, checks default/named ESM exports and declarations, and runs JS/TS/framework smoke checks. The temporary store/cache settings are inherited by pnpm's pre-run install checks, including in cloud sandboxes without a writable home directory.
|
|
41
|
+
This creates a fresh consumer, installs the exact registry version using pnpm 11.22.0, checks default/named ESM exports and declarations, and runs JS/TS/framework smoke checks. The temporary store/cache settings are inherited by pnpm's pre-run install checks, including in cloud sandboxes without a writable home directory. The user-authorized age selector is `@ztd-me/*`; other packages keep a strict 1440-minute age gate. No-downgrade and the existing exact `semver@6.3.1` trust exception remain active, with no scope trust exclusion. A stage response, registry metadata alone, or a local tarball install is insufficient proof of public installation.
|