eslint-plugin-baseline-js 0.6.0 → 0.6.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 +24 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +894 -577
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -144,6 +144,30 @@ and shows which ones are currently mapped by this plugin.
|
|
|
144
144
|
| `ignoreFeatures` | `string[]` | — | Skip specific web‑features by ID (supports regex `/.../`) across syntax delegates and Web API/JS builtin detection. |
|
|
145
145
|
| `ignoreNodeTypes` | `string[]` | — | Suppress reports by ESTree `node.type` (supports regex `/.../`). |
|
|
146
146
|
|
|
147
|
+
## Use with [oxlint](https://oxc.rs/)
|
|
148
|
+
|
|
149
|
+
Runs as an [oxlint JS plugin](https://oxc.rs/docs/guide/usage/linter/js-plugins). Just drop it into `.oxlintrc.json`:
|
|
150
|
+
|
|
151
|
+
```jsonc
|
|
152
|
+
// .oxlintrc.json
|
|
153
|
+
{
|
|
154
|
+
"jsPlugins": ["eslint-plugin-baseline-js"],
|
|
155
|
+
"rules": {
|
|
156
|
+
"baseline-js/use-baseline": [
|
|
157
|
+
"warn",
|
|
158
|
+
{
|
|
159
|
+
"available": "widely",
|
|
160
|
+
"includeWebApis": { "preset": "auto" },
|
|
161
|
+
"includeJsBuiltins": { "preset": "auto" }
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
> [!CAUTION]
|
|
169
|
+
> **No type-aware detection under oxlint.** Checks that need TypeScript type resolution (e.g., `Set.difference()`, `Iterator.map()`) won't fire. Use ESLint with the `type-aware` preset if you need them.
|
|
170
|
+
|
|
147
171
|
## Baseline for HTML, CSS, and React
|
|
148
172
|
|
|
149
173
|
Baseline works best when HTML, CSS, JS, and React all align. For markup, styles, and React, enable the "use-baseline" rules from these ESLint plugins:
|
package/dist/index.d.mts
CHANGED
|
@@ -55,6 +55,10 @@ declare function recommendedTsConfig(opts?: {
|
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/index.d.ts
|
|
57
57
|
declare const _default: {
|
|
58
|
+
readonly meta: {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly version: string;
|
|
61
|
+
};
|
|
58
62
|
readonly rules: Record<string, Rule.RuleModule>;
|
|
59
63
|
readonly configs: {
|
|
60
64
|
readonly baseline: typeof baselineConfigs;
|