eslint-plugin-baseline-js 0.6.0 → 0.6.1
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 +5 -0
- package/package.json +1 -1
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;
|
package/dist/index.mjs
CHANGED
|
@@ -63021,6 +63021,7 @@ const rule = {
|
|
|
63021
63021
|
|
|
63022
63022
|
//#endregion
|
|
63023
63023
|
//#region src/index.ts
|
|
63024
|
+
const pkg = createRequire(import.meta.url)("../package.json");
|
|
63024
63025
|
const rules = {
|
|
63025
63026
|
"use-baseline": rule,
|
|
63026
63027
|
"no-atomics-pause": rule$5,
|
|
@@ -63030,6 +63031,10 @@ const rules = {
|
|
|
63030
63031
|
"no-temporal": rule$1
|
|
63031
63032
|
};
|
|
63032
63033
|
var src_default = {
|
|
63034
|
+
meta: {
|
|
63035
|
+
name: pkg.name,
|
|
63036
|
+
version: pkg.version
|
|
63037
|
+
},
|
|
63033
63038
|
rules,
|
|
63034
63039
|
configs: {
|
|
63035
63040
|
baseline: baselineConfigs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-baseline-js",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Enforce JavaScript Baseline (widely/newly/year) browser compatibility with a single ESLint rule. Prevent runtime errors by catching unsupported JavaScript features during development.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|