@ztd-me/eslint 0.1.1 → 0.1.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zeithrold
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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.1` 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.
144
+ [Publishing instructions](docs/publishing.md) describe the stage-only GitHub workflow and the user-controlled promotion. Version `0.1.3` prepares the MIT metadata and full license notice for a new npm release. Staging is not a public release. After promotion, run `node scripts/registry-smoke.mjs 0.1.3` 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
- The repository has not granted an open-source license; package metadata is `UNLICENSED` pending that separate decision.
146
+ First-party code and documentation are [MIT licensed](LICENSE). Installed ESLint, antfu and plugin dependencies retain their own licenses and notices; the package does not relicense them. Existing published versions keep their original artifacts and metadata.
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: ['**/*.md/**', '**/*.astro/*.ts'],
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
- ...(typescript === false ? [] : typed(tsFiles)),
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 ? false : { ...tsOptions, filesTypeAware: tsFiles },
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,
@@ -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
- ## Current dependency integration blocker
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. No trust exclusion or policy weakening is included in this patch.
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.
@@ -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/**` or `.github/workflows/publish-eslint.yml`. 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.
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. Supply-chain settings are left unchanged. pnpm 11's default non-strict release-age policy can automatically record a version-specific exception for a fresh explicit dependency; projects with strict release-age policies must wait until their cutoff. If an active policy rejects installation, wait for eligibility and retry; do not manually set exceptions or lower the policy. A stage response, registry metadata alone, or a local tarball install is insufficient proof of public installation.
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.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@ztd-me/eslint",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Strict typed ESLint flat configs for TypeScript, React and Vue, built on antfu",
6
- "license": "UNLICENSED",
6
+ "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/zeithrold/tools.git",
@@ -21,7 +21,8 @@
21
21
  "files": [
22
22
  "dist",
23
23
  "docs",
24
- "README.md"
24
+ "README.md",
25
+ "LICENSE"
25
26
  ],
26
27
  "publishConfig": {
27
28
  "access": "public",