Repository navigation
Commit cf83dee
committed
feat: close guideline coverage gaps for JavaScript and TypeScript
Every numbered clause of the pinned guide had a catalog row, but several
rows claimed enforcement that the resolved settings did not provide, the
guideline policy reversed only one prose/sample conflict, and TypeScript
files ran pinned JavaScript rules that misreport TypeScript syntax.
Catalog: record a disposition per policy (compatibility and guideline),
add a `partial` enforcement level, scope mappings to the base preset,
the guideline policy, or an opt-in profile, and record the TypeScript
implementation of each replaced rule. Dispositions for 5.2, 10.4, 10.10,
10.11, 16.1, 17.1, 18.1, 18.6, and 7.2 now match actual behavior.
Guideline policy: enforce the prose for clauses 5.2, 6.2/18.13, 10.1,
10.2, 10.6, 10.10 (selectable `importGroups: example | prose`), 10.11,
16.1, 17.1, 17.2, 18.1 (JSX), 18.6, 18.7, 22.1, and 22.7. Add rules
no-multiline-string-concat, multiline-condition-layout, constant-name,
and a lineCommentRuns option for require-docblock.
TypeScript: replace pinned rules that report valid TypeScript or ignore
TypeScript syntax with TypeScript-aware implementations of the same rules
and options (native no-dupe-class-members, no-array-constructor,
default-param-last, no-use-before-define; Stylistic comma-dangle,
comma-spacing, key-spacing, lines-between-class-members,
lines-around-comment, object-curly-spacing, semi, space-before-blocks,
space-infix-ops; merge-aware ag-ts/no-redeclare). no-accessors covers
abstract, signature, and auto-accessors; unknown-catch covers every
catch binding pattern. `--check-tsconfig` verifies clauses 26.1/26.2.
Profile: move AdGuard project conventions that the guide does not
require (stricter JSDoc, MV2/MV3 imports, import-newlines, boundaries,
logger context, @typescript-eslint rules) from the base preset into the
opt-in `adguard-projects` profile with accurate provenance.
Tests: run every enforced clause's good and bad examples through the
complete preset for both policies, require partial and overridden
dispositions to be demonstrated, and require an idiomatic TypeScript
corpus to pass the full TypeScript preset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCeDV2VhbUtLyAP9XRG1zL1 parent 3a4ae06 commit cf83dee
44 files changed
Lines changed: 6528 additions & 1371 deletions
File tree
- docs
- packages
- oxlint-config
- src
- oxlint-plugin
- src
- rule-catalog
- src
- scripts
- tests
- fixtures/typescript
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
0 commit comments