feat(linter): add schema for eslint/no-restricted-imports#23040
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
f854976 to
a61b9d4
Compare
f08cbe1 to
d1f2a9c
Compare
3a0a87c to
8509b6a
Compare
There was a problem hiding this comment.
Pull request overview
Adds a concrete configuration schema for the eslint/no-restricted-imports rule so it can be represented in the generated JSON schema (used by the website/docs) and the generated TypeScript config types.
Changes:
- Replaces the
no-restricted-importsplaceholder (DummyRule) schema with an explicitanyOfschema covering severity-only and the supported option shapes. - Introduces new schema definitions (
RestrictedPath,RestrictedPattern,NoRestrictedImportsConfig, etc.) and propagates them into the generated JSON snapshot and TS types. - Removes
eslint/no-restricted-importsfrom the “unverified schema” skip list so its schema is emitted.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tasks/website_linter/src/snapshots/schema_json.snap | Updates the schema snapshot to include the new no-restricted-imports schema and definitions. |
| npm/oxlint/configuration_schema.json | Updates the published configuration JSON schema with the new rule schema/definitions. |
| crates/oxc_linter/src/utils/schemars.rs | Stops treating eslint/no-restricted-imports as “schema not verified”. |
| crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs | Adds schemars/serde scaffolding to describe the rule’s config schema and updates regex deserialization approach. |
| apps/oxlint/src-js/package/config.generated.ts | Regenerates TS types to reflect the new schema definitions and rule option shapes. |
8509b6a to
197cd4a
Compare
d1f2a9c to
21615eb
Compare
197cd4a to
8d24cb1
Compare
21615eb to
780362e
Compare
8d24cb1 to
44d6bee
Compare

No description provided.