exadev-eslint-config 2.36.3 → 2.36.5
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 +2 -2
- package/dist/index.cjs +23 -21
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +23 -21
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1825,7 +1825,7 @@ pnpm build
|
|
|
1825
1825
|
|
|
1826
1826
|
- [`eslint.config.ts`](eslint.config.ts) dogfoods this package's own factory export on itself (`import { exadevConfig } from './src/index'`), spreading `exadevConfig({ react: false, nextjs: false, ... })`, with the [tooling wiring](#tooling-wiring) preset on for the sections it uses. React and Next.js are forced off explicitly, not left to the plain auto-detecting default, since `eslint-plugin-react`/`@next/eslint-plugin-next` are real devDependencies of *this* repo (needed to test [`src/react.ts`](src/react.ts)/[`src/nextjs.ts`](src/nextjs.ts)'s own "package is resolvable" branch) even though this repo is neither a React nor a Next.js project. `no-side-effects-in-index` and `no-non-barrel-reexport` self-scope to [`src/index.ts`](src/index.ts) internally, so no `files`/`ignores` wiring is needed here. Plugin construction lives in [`src/plugin.ts`](src/plugin.ts) specifically so `src/index.ts` stays a pure re-export point.
|
|
1827
1827
|
- [`tsconfig.json`](tsconfig.json) enables [`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax) (`import type`/`export type` required for type-only imports — also enforced by `consistent-type-imports`) and [`noUncheckedIndexedAccess`](https://www.typescriptlang.org/tsconfig/#noUncheckedIndexedAccess) (narrow indexed access before use rather than asserting).
|
|
1828
|
-
- Conventional commits are enforced by [commitlint](https://commitlint.js.org), restricted to the type-enum defined once in [`release.config.ts`](release.config.ts)'s `commitTypes` —
|
|
1828
|
+
- Conventional commits are enforced by [commitlint](https://commitlint.js.org), restricted to the type-enum defined once in [`release.config.ts`](release.config.ts)'s `commitTypes` — commitlint, the release rules and the release notes' section titles all derive from that single list.
|
|
1829
1829
|
|
|
1830
1830
|
### Gotchas and quirks
|
|
1831
1831
|
|
|
@@ -1842,7 +1842,7 @@ Conventional commits are enforced by a husky `commit-msg` hook and re-checked in
|
|
|
1842
1842
|
|
|
1843
1843
|
### Release
|
|
1844
1844
|
|
|
1845
|
-
Conventional commits drive [semantic-release](https://semantic-release.gitbook.io/semantic-release) on every push to `main`: version bump, `CHANGELOG.md`, GitHub Release, and npm publish via [OIDC trusted publishing](https://docs.npmjs.com/trusted-publishers) (no stored token). The release commit and tag are pushed over SSH with a repository deploy key that bypasses the `main` ruleset; the key is written to the runner's temporary directory only by the step directly before semantic-release (checkout does not receive it and persists no credentials) and removed afterwards, and the job's actions are pinned to commit SHAs. This narrows the key's exposure without isolating it: code run by an earlier step, or by semantic-release and its plugins from `node_modules`, can still reach it, so a credential that does not outlive the job (a short-lived GitHub App installation token) remains the complete fix. A second CI job republishes the identical build under the unscoped alias `exadev-eslint-config`.
|
|
1845
|
+
Conventional commits drive [semantic-release](https://semantic-release.gitbook.io/semantic-release) on every push to `main`: version bump, `CHANGELOG.md`, GitHub Release, and npm publish via [OIDC trusted publishing](https://docs.npmjs.com/trusted-publishers) (no stored token). The release commit and tag are pushed over SSH with a repository deploy key that bypasses the `main` ruleset; the key is written to the runner's temporary directory only by the step directly before semantic-release (checkout does not receive it and persists no credentials) and removed afterwards, and the job's actions are pinned to commit SHAs. This narrows the key's exposure without isolating it: code run by an earlier step, or by semantic-release and its plugins from `node_modules`, can still reach it, so a credential that does not outlive the job (a short-lived GitHub App installation token) remains the complete fix. A second CI job republishes the identical build under the unscoped alias `exadev-eslint-config`. The release notes and `CHANGELOG.md` list every commit under the section titled for its type in `commitTypes` ([`release.config.ts`](release.config.ts)), in that list's order, so a release made only of `refactor`, `docs`, `test` or `chore` commits still has a body; the `chore(release)` commits are the one exclusion. The notes use the `angular` preset's layout with its commit transform replaced, because that preset hides every type but `feat`, `fix`, `perf` and `revert`; the `conventionalcommits` preset is not used, because the writer bundled with the release-notes generator does not render its templates.
|
|
1846
1846
|
|
|
1847
1847
|
## License
|
|
1848
1848
|
|
package/dist/index.cjs
CHANGED
|
@@ -485,7 +485,7 @@ function buildOptionalPluginConfig(preset, options = {}) {
|
|
|
485
485
|
}
|
|
486
486
|
//#endregion
|
|
487
487
|
//#region package.json
|
|
488
|
-
var version = "2.36.
|
|
488
|
+
var version = "2.36.5";
|
|
489
489
|
//#endregion
|
|
490
490
|
//#region src/react.ts
|
|
491
491
|
/**
|
|
@@ -1457,7 +1457,7 @@ function readNonEmptyStrings(value, optionName, what) {
|
|
|
1457
1457
|
*/
|
|
1458
1458
|
function compilePattern$1(pattern, optionName) {
|
|
1459
1459
|
try {
|
|
1460
|
-
|
|
1460
|
+
RegExp(pattern, "u");
|
|
1461
1461
|
} catch (error) {
|
|
1462
1462
|
assertIsError(error, regExpConstructorContext(pattern));
|
|
1463
1463
|
throw new Error(`@exadev/eslint-config: "${optionName}" pattern "${pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
|
|
@@ -1808,7 +1808,7 @@ function isRankRule(value) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
function validateRankRulePatterns(rankRules) {
|
|
1810
1810
|
for (const rule of rankRules) try {
|
|
1811
|
-
|
|
1811
|
+
RegExp(rule.pattern, "u");
|
|
1812
1812
|
} catch (error) {
|
|
1813
1813
|
assertIsError(error, regExpConstructorContext(rule.pattern));
|
|
1814
1814
|
throw new Error(`@exadev/eslint-config: "nameRanks" pattern "${rule.pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
|
|
@@ -2401,24 +2401,26 @@ function createFilenamePatternRule(fs = realWorkspaceFs) {
|
|
|
2401
2401
|
const lines = countLines(context.sourceCode.lines);
|
|
2402
2402
|
for (const entry of entries) {
|
|
2403
2403
|
if (entry.overLines !== void 0 && lines <= entry.overLines) continue;
|
|
2404
|
-
if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name))
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2404
|
+
if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name)) {
|
|
2405
|
+
if (entry.overLines === void 0) context.report({
|
|
2406
|
+
node,
|
|
2407
|
+
messageId: "nameMismatch",
|
|
2408
|
+
data: {
|
|
2409
|
+
name,
|
|
2410
|
+
pattern: entry.pattern.source
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
else context.report({
|
|
2414
|
+
node,
|
|
2415
|
+
messageId: "oversizedNameMismatch",
|
|
2416
|
+
data: {
|
|
2417
|
+
name,
|
|
2418
|
+
pattern: entry.pattern.source,
|
|
2419
|
+
lines: String(lines),
|
|
2420
|
+
limit: String(entry.overLines)
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
}
|
|
2422
2424
|
if (entry.siblings.length === 0) continue;
|
|
2423
2425
|
const expected = entry.siblings.map((template) => template.replaceAll(SIBLING_NAME_PLACEHOLDER, stem(name)));
|
|
2424
2426
|
if (!expected.some((sibling) => fs.existsSync((0, node_path.resolve)((0, node_path.dirname)(context.filename), sibling)))) context.report({
|
package/dist/index.d.cts
CHANGED
|
@@ -35,7 +35,7 @@ interface AgentSkillsOptions {
|
|
|
35
35
|
/**
|
|
36
36
|
* Lints agent SKILL.md files and Claude Code plugin manifests, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Always on: it throws at call time for a malformed option or when `@eslint/markdown` or `@eslint/json` is not installed. See the README's "Agent skills and plugin marketplaces" section.
|
|
37
37
|
*/
|
|
38
|
-
declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
|
|
38
|
+
export declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/rules/markdown-required-heading.d.ts
|
|
41
41
|
/**
|
|
@@ -63,7 +63,7 @@ interface MarkdownHeadingsOptions {
|
|
|
63
63
|
/**
|
|
64
64
|
* Requires the Markdown files `files` selects to contain each heading, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option or when `@eslint/markdown` is not installed. See the README's "Required Markdown headings" section.
|
|
65
65
|
*/
|
|
66
|
-
declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
|
|
66
|
+
export declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/rules/pure-module-options.d.ts
|
|
69
69
|
/**
|
|
@@ -84,7 +84,7 @@ interface PureModulesOptions extends PureModuleOptions {
|
|
|
84
84
|
/**
|
|
85
85
|
* Wires the pure-module bans onto `files`, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...pureModulesConfig({ files: ['src/core/**'] })`). Throws at call time for a malformed option, including an `allowImports` entry that selects no banned module. See the README's "Pure modules" section.
|
|
86
86
|
*/
|
|
87
|
-
declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
|
|
87
|
+
export declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/test-hygiene.d.ts
|
|
90
90
|
/**
|
|
@@ -99,7 +99,7 @@ interface TestHygieneOptions {
|
|
|
99
99
|
/**
|
|
100
100
|
* Wires guard and conformance test hygiene, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...testHygieneConfig()`). Throws at call time for a malformed option or a missing plugin. See the README's "Guard and conformance test hygiene" section.
|
|
101
101
|
*/
|
|
102
|
-
declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
|
|
102
|
+
export declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/rules/file-reference.d.ts
|
|
105
105
|
/**
|
|
@@ -253,7 +253,7 @@ interface ToolingWiringOptions {
|
|
|
253
253
|
/**
|
|
254
254
|
* Wires the tooling preset, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option, and for a package.json section without the optional peer `@eslint/json`. See the README's "Tooling wiring" section.
|
|
255
255
|
*/
|
|
256
|
-
declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
|
|
256
|
+
export declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region src/rules/import-policy-options.d.ts
|
|
259
259
|
interface ImportDenyBase {
|
|
@@ -438,7 +438,7 @@ interface ExadevConfigOptions {
|
|
|
438
438
|
*
|
|
439
439
|
* The tri-state per feature threads straight into each builder's own `enabled` option: true forces on (throwing if the underlying peer isn't resolvable), false forces off (skipping resolution entirely), undefined auto-detects (silently empty if unresolvable, or if an equivalent tool, syncpack for packageJsonKeyOrder, or a project's own .gitignore for gitignore, already does the job). One resolution pass per feature; no separate pre-check gate that would resolve twice.
|
|
440
440
|
*/
|
|
441
|
-
declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
|
|
441
|
+
export declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
|
|
442
442
|
/**
|
|
443
443
|
* Evaluated once, eagerly, at module load -- exactly matching how recommendedTypeChecked itself is already eagerly built today. This is what lets src/index.ts re-export a plain, already-computed array under the name `default`: every existing consumer's `...exadev` spread sees the identical shape and timing as before this file existed, whether or not React/Next.js support resolves in their own project.
|
|
444
444
|
*/
|
|
@@ -448,7 +448,7 @@ declare const defaultConfig: PublicConfigArray;
|
|
|
448
448
|
/**
|
|
449
449
|
* Wires `exadev/import-policy` from a list of `ImportPolicy` objects, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...importPolicyConfig(policies)`). Throws at call time for a malformed policy, including an exception edge that could never apply. See the README's "Import policy" section.
|
|
450
450
|
*/
|
|
451
|
-
declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
|
|
451
|
+
export declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
|
|
452
452
|
//#endregion
|
|
453
453
|
//#region src/plugin.d.ts
|
|
454
454
|
/**
|
|
@@ -462,7 +462,7 @@ declare const publicPlugin: PublicPlugin;
|
|
|
462
462
|
*
|
|
463
463
|
* Retyped at the same public boundary `workspaceArchitectureConfig` is, through `toPublicConfigArray`. Its parameter is `TurboOptions` rather than `TurboConfigOptions`, which keeps the `requireFn` test seam out of the published declarations.
|
|
464
464
|
*/
|
|
465
|
-
declare function turboConfig(options?: TurboOptions): PublicConfigArray;
|
|
465
|
+
export declare function turboConfig(options?: TurboOptions): PublicConfigArray;
|
|
466
466
|
//#endregion
|
|
467
467
|
//#region src/verify-eslint.d.ts
|
|
468
468
|
/**
|
|
@@ -512,17 +512,17 @@ type EslintViolation = FileViolation | RuleViolation;
|
|
|
512
512
|
*
|
|
513
513
|
* The required rules default to those the baseline (this package's default export) enables for the same file, at the severity it gives them, so `rules` and `except` list only the differences. Returns every violation, none when the configuration holds; a violation names the file and the rule.
|
|
514
514
|
*/
|
|
515
|
-
declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
|
|
515
|
+
export declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
|
|
516
516
|
/**
|
|
517
517
|
* Runs `verifyEslintConfig` and throws one error listing every violation, one per line, so a vitest test is `await assertEslintConfig({ samples: [...] })`.
|
|
518
518
|
*/
|
|
519
|
-
declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
|
|
519
|
+
export declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
|
|
520
520
|
//#endregion
|
|
521
521
|
//#region src/workspace-architecture.d.ts
|
|
522
522
|
/**
|
|
523
523
|
* Wires the workspace-architecture rules onto `**\/package.json` from one `WorkspaceArchitectureOptions` object (`no-uphill-dependency` and `no-dependency-cycle` always; `package-name-mirrors-path`, `package-has-files`, `dev-dependency-only` and `required-scripts` only when their own option is given), returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...workspaceArchitectureConfig(options)`, the README's own standalone usage) alongside a consumer's own configuration.
|
|
524
524
|
*/
|
|
525
|
-
declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
|
|
525
|
+
export declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region src/rules/filename-pattern.d.ts
|
|
528
528
|
/**
|
|
@@ -554,4 +554,4 @@ interface RequiredImportsEntry {
|
|
|
554
554
|
readonly call?: boolean;
|
|
555
555
|
}
|
|
556
556
|
//#endregion
|
|
557
|
-
export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions,
|
|
557
|
+
export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions, defaultConfig as default, publicPlugin as plugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ interface AgentSkillsOptions {
|
|
|
35
35
|
/**
|
|
36
36
|
* Lints agent SKILL.md files and Claude Code plugin manifests, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Always on: it throws at call time for a malformed option or when `@eslint/markdown` or `@eslint/json` is not installed. See the README's "Agent skills and plugin marketplaces" section.
|
|
37
37
|
*/
|
|
38
|
-
declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
|
|
38
|
+
export declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/rules/markdown-required-heading.d.ts
|
|
41
41
|
/**
|
|
@@ -63,7 +63,7 @@ interface MarkdownHeadingsOptions {
|
|
|
63
63
|
/**
|
|
64
64
|
* Requires the Markdown files `files` selects to contain each heading, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option or when `@eslint/markdown` is not installed. See the README's "Required Markdown headings" section.
|
|
65
65
|
*/
|
|
66
|
-
declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
|
|
66
|
+
export declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/rules/pure-module-options.d.ts
|
|
69
69
|
/**
|
|
@@ -84,7 +84,7 @@ interface PureModulesOptions extends PureModuleOptions {
|
|
|
84
84
|
/**
|
|
85
85
|
* Wires the pure-module bans onto `files`, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...pureModulesConfig({ files: ['src/core/**'] })`). Throws at call time for a malformed option, including an `allowImports` entry that selects no banned module. See the README's "Pure modules" section.
|
|
86
86
|
*/
|
|
87
|
-
declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
|
|
87
|
+
export declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/test-hygiene.d.ts
|
|
90
90
|
/**
|
|
@@ -99,7 +99,7 @@ interface TestHygieneOptions {
|
|
|
99
99
|
/**
|
|
100
100
|
* Wires guard and conformance test hygiene, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...testHygieneConfig()`). Throws at call time for a malformed option or a missing plugin. See the README's "Guard and conformance test hygiene" section.
|
|
101
101
|
*/
|
|
102
|
-
declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
|
|
102
|
+
export declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/rules/file-reference.d.ts
|
|
105
105
|
/**
|
|
@@ -253,7 +253,7 @@ interface ToolingWiringOptions {
|
|
|
253
253
|
/**
|
|
254
254
|
* Wires the tooling preset, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option, and for a package.json section without the optional peer `@eslint/json`. See the README's "Tooling wiring" section.
|
|
255
255
|
*/
|
|
256
|
-
declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
|
|
256
|
+
export declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region src/rules/import-policy-options.d.ts
|
|
259
259
|
interface ImportDenyBase {
|
|
@@ -438,7 +438,7 @@ interface ExadevConfigOptions {
|
|
|
438
438
|
*
|
|
439
439
|
* The tri-state per feature threads straight into each builder's own `enabled` option: true forces on (throwing if the underlying peer isn't resolvable), false forces off (skipping resolution entirely), undefined auto-detects (silently empty if unresolvable, or if an equivalent tool, syncpack for packageJsonKeyOrder, or a project's own .gitignore for gitignore, already does the job). One resolution pass per feature; no separate pre-check gate that would resolve twice.
|
|
440
440
|
*/
|
|
441
|
-
declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
|
|
441
|
+
export declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
|
|
442
442
|
/**
|
|
443
443
|
* Evaluated once, eagerly, at module load -- exactly matching how recommendedTypeChecked itself is already eagerly built today. This is what lets src/index.ts re-export a plain, already-computed array under the name `default`: every existing consumer's `...exadev` spread sees the identical shape and timing as before this file existed, whether or not React/Next.js support resolves in their own project.
|
|
444
444
|
*/
|
|
@@ -448,7 +448,7 @@ declare const defaultConfig: PublicConfigArray;
|
|
|
448
448
|
/**
|
|
449
449
|
* Wires `exadev/import-policy` from a list of `ImportPolicy` objects, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...importPolicyConfig(policies)`). Throws at call time for a malformed policy, including an exception edge that could never apply. See the README's "Import policy" section.
|
|
450
450
|
*/
|
|
451
|
-
declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
|
|
451
|
+
export declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
|
|
452
452
|
//#endregion
|
|
453
453
|
//#region src/plugin.d.ts
|
|
454
454
|
/**
|
|
@@ -462,7 +462,7 @@ declare const publicPlugin: PublicPlugin;
|
|
|
462
462
|
*
|
|
463
463
|
* Retyped at the same public boundary `workspaceArchitectureConfig` is, through `toPublicConfigArray`. Its parameter is `TurboOptions` rather than `TurboConfigOptions`, which keeps the `requireFn` test seam out of the published declarations.
|
|
464
464
|
*/
|
|
465
|
-
declare function turboConfig(options?: TurboOptions): PublicConfigArray;
|
|
465
|
+
export declare function turboConfig(options?: TurboOptions): PublicConfigArray;
|
|
466
466
|
//#endregion
|
|
467
467
|
//#region src/verify-eslint.d.ts
|
|
468
468
|
/**
|
|
@@ -512,17 +512,17 @@ type EslintViolation = FileViolation | RuleViolation;
|
|
|
512
512
|
*
|
|
513
513
|
* The required rules default to those the baseline (this package's default export) enables for the same file, at the severity it gives them, so `rules` and `except` list only the differences. Returns every violation, none when the configuration holds; a violation names the file and the rule.
|
|
514
514
|
*/
|
|
515
|
-
declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
|
|
515
|
+
export declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
|
|
516
516
|
/**
|
|
517
517
|
* Runs `verifyEslintConfig` and throws one error listing every violation, one per line, so a vitest test is `await assertEslintConfig({ samples: [...] })`.
|
|
518
518
|
*/
|
|
519
|
-
declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
|
|
519
|
+
export declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
|
|
520
520
|
//#endregion
|
|
521
521
|
//#region src/workspace-architecture.d.ts
|
|
522
522
|
/**
|
|
523
523
|
* Wires the workspace-architecture rules onto `**\/package.json` from one `WorkspaceArchitectureOptions` object (`no-uphill-dependency` and `no-dependency-cycle` always; `package-name-mirrors-path`, `package-has-files`, `dev-dependency-only` and `required-scripts` only when their own option is given), returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...workspaceArchitectureConfig(options)`, the README's own standalone usage) alongside a consumer's own configuration.
|
|
524
524
|
*/
|
|
525
|
-
declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
|
|
525
|
+
export declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region src/rules/filename-pattern.d.ts
|
|
528
528
|
/**
|
|
@@ -554,4 +554,4 @@ interface RequiredImportsEntry {
|
|
|
554
554
|
readonly call?: boolean;
|
|
555
555
|
}
|
|
556
556
|
//#endregion
|
|
557
|
-
export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions,
|
|
557
|
+
export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions, defaultConfig as default, publicPlugin as plugin };
|
package/dist/index.js
CHANGED
|
@@ -450,7 +450,7 @@ function buildOptionalPluginConfig(preset, options = {}) {
|
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region package.json
|
|
453
|
-
var version = "2.36.
|
|
453
|
+
var version = "2.36.5";
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/react.ts
|
|
456
456
|
/**
|
|
@@ -1422,7 +1422,7 @@ function readNonEmptyStrings(value, optionName, what) {
|
|
|
1422
1422
|
*/
|
|
1423
1423
|
function compilePattern$1(pattern, optionName) {
|
|
1424
1424
|
try {
|
|
1425
|
-
|
|
1425
|
+
RegExp(pattern, "u");
|
|
1426
1426
|
} catch (error) {
|
|
1427
1427
|
assertIsError(error, regExpConstructorContext(pattern));
|
|
1428
1428
|
throw new Error(`@exadev/eslint-config: "${optionName}" pattern "${pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
|
|
@@ -1773,7 +1773,7 @@ function isRankRule(value) {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
function validateRankRulePatterns(rankRules) {
|
|
1775
1775
|
for (const rule of rankRules) try {
|
|
1776
|
-
|
|
1776
|
+
RegExp(rule.pattern, "u");
|
|
1777
1777
|
} catch (error) {
|
|
1778
1778
|
assertIsError(error, regExpConstructorContext(rule.pattern));
|
|
1779
1779
|
throw new Error(`@exadev/eslint-config: "nameRanks" pattern "${rule.pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
|
|
@@ -2366,24 +2366,26 @@ function createFilenamePatternRule(fs = realWorkspaceFs) {
|
|
|
2366
2366
|
const lines = countLines(context.sourceCode.lines);
|
|
2367
2367
|
for (const entry of entries) {
|
|
2368
2368
|
if (entry.overLines !== void 0 && lines <= entry.overLines) continue;
|
|
2369
|
-
if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name))
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2369
|
+
if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name)) {
|
|
2370
|
+
if (entry.overLines === void 0) context.report({
|
|
2371
|
+
node,
|
|
2372
|
+
messageId: "nameMismatch",
|
|
2373
|
+
data: {
|
|
2374
|
+
name,
|
|
2375
|
+
pattern: entry.pattern.source
|
|
2376
|
+
}
|
|
2377
|
+
});
|
|
2378
|
+
else context.report({
|
|
2379
|
+
node,
|
|
2380
|
+
messageId: "oversizedNameMismatch",
|
|
2381
|
+
data: {
|
|
2382
|
+
name,
|
|
2383
|
+
pattern: entry.pattern.source,
|
|
2384
|
+
lines: String(lines),
|
|
2385
|
+
limit: String(entry.overLines)
|
|
2386
|
+
}
|
|
2387
|
+
});
|
|
2388
|
+
}
|
|
2387
2389
|
if (entry.siblings.length === 0) continue;
|
|
2388
2390
|
const expected = entry.siblings.map((template) => template.replaceAll(SIBLING_NAME_PLACEHOLDER, stem(name)));
|
|
2389
2391
|
if (!expected.some((sibling) => fs.existsSync(resolve(dirname(context.filename), sibling)))) context.report({
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exadev-eslint-config",
|
|
3
3
|
"description": "Shared custom ESLint rules and plugin for ExaDev projects",
|
|
4
|
-
"version": "2.36.
|
|
4
|
+
"version": "2.36.5",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@eslint/js": "^10.0.1",
|
|
7
|
-
"@microsoft/tsdoc": "0.17.
|
|
7
|
+
"@microsoft/tsdoc": "0.17.1",
|
|
8
8
|
"@stylistic/eslint-plugin": "6.0.0-beta.6",
|
|
9
|
-
"@typescript-eslint/typescript-estree": "8.
|
|
10
|
-
"@typescript-eslint/utils": "8.
|
|
9
|
+
"@typescript-eslint/typescript-estree": "8.71.0",
|
|
10
|
+
"@typescript-eslint/utils": "8.71.0",
|
|
11
11
|
"eslint-plugin-jsdoc": "64.3.6",
|
|
12
|
-
"eslint-plugin-json-canonical": "2.1.
|
|
12
|
+
"eslint-plugin-json-canonical": "2.1.3",
|
|
13
13
|
"eslint-plugin-tsdoc": "^0.5.2",
|
|
14
14
|
"minimatch": "10.2.6",
|
|
15
15
|
"ts-api-utils": "^2.5.0",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"@next/eslint-plugin-next": "^16.3.2",
|
|
28
28
|
"@semantic-release/changelog": "^7.0.0",
|
|
29
29
|
"@semantic-release/git": "^11.0.1",
|
|
30
|
+
"@semantic-release/release-notes-generator": "14.1.1",
|
|
30
31
|
"@stryker-mutator/api": "10.0.0",
|
|
31
32
|
"@stryker-mutator/core": "10.0.0",
|
|
32
33
|
"@stryker-mutator/typescript-checker": "10.0.0",
|
|
@@ -41,12 +42,12 @@
|
|
|
41
42
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
42
43
|
"eslint-plugin-react": "^7.37.5",
|
|
43
44
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
44
|
-
"eslint-plugin-turbo": "2.11.
|
|
45
|
+
"eslint-plugin-turbo": "2.11.7",
|
|
45
46
|
"husky": "^9.1.7",
|
|
46
47
|
"lint-staged": "^17.2.0",
|
|
47
48
|
"publint": "^0.3.21",
|
|
48
49
|
"semantic-release": "^25.0.8",
|
|
49
|
-
"tsdown": "^0.
|
|
50
|
+
"tsdown": "^0.23.0",
|
|
50
51
|
"turbo": "^2.11.5",
|
|
51
52
|
"typescript": "^6.0.3",
|
|
52
53
|
"typescript-eslint": "^8.67.0",
|