eslint-plugin-baseline-js 0.7.5 → 0.7.7
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 +4 -1
- package/dist/index.d.mts +0 -6
- package/dist/index.mjs +21022 -935
- package/package.json +21 -20
package/README.md
CHANGED
|
@@ -131,6 +131,7 @@ Its [example PR](https://github.com/3ru/baseline-checks-demo/pull/1) changes one
|
|
|
131
131
|
- Maps web‑features IDs to underlying rules (prefer `eslint-plugin-es-x` / ESLint core; custom rules only when necessary).
|
|
132
132
|
3. Resolution → `src/baseline/resolve.ts`
|
|
133
133
|
- Classifies “beyond baseline” by bucket (`high/low/false → widely/newly/limited`) or year.
|
|
134
|
+
- Web API and JS builtin checks use the matched API member's own Baseline status from web‑features `status.by_compat_key` when it differs from the feature's, so `URL.parse()` is newer than the `url` feature.
|
|
134
135
|
|
|
135
136
|
## Coverage
|
|
136
137
|
|
|
@@ -151,6 +152,8 @@ and shows which ones are currently mapped by this plugin.
|
|
|
151
152
|
|
|
152
153
|
## Use with [oxlint](https://oxc.rs/)
|
|
153
154
|
|
|
155
|
+
See [Linter compatibility](https://baselinejs.vercel.app/docs/compatibility) for versioned Baseline check results under ESLint, Oxlint, and Bun.
|
|
156
|
+
|
|
154
157
|
Runs as an [oxlint JS plugin](https://oxc.rs/docs/guide/usage/linter/js-plugins). Just drop it into `.oxlintrc.json`:
|
|
155
158
|
|
|
156
159
|
```jsonc
|
|
@@ -171,7 +174,7 @@ Runs as an [oxlint JS plugin](https://oxc.rs/docs/guide/usage/linter/js-plugins)
|
|
|
171
174
|
```
|
|
172
175
|
|
|
173
176
|
> [!CAUTION]
|
|
174
|
-
> **
|
|
177
|
+
> **Oxlint and Bun do not currently expose TypeScript type information through their JavaScript plugin APIs.** Type-aware Baseline checks, such as `Set.prototype.difference()` and `Iterator.prototype.map()`, therefore cannot run in these hosts. Use the [ESLint TypeScript setup](https://baselinejs.vercel.app/docs#add-typescript) to enable these checks.
|
|
175
178
|
|
|
176
179
|
## Baseline for HTML, CSS, and React
|
|
177
180
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Rule } from "eslint";
|
|
2
|
-
//#region src/config.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Named constants for Baseline string options.
|
|
5
4
|
* Prefer using these to avoid typos in user configs.
|
|
@@ -12,8 +11,6 @@ export declare const BASELINE: {
|
|
|
12
11
|
type BaselineName = (typeof BASELINE)[keyof typeof BASELINE];
|
|
13
12
|
/** Final option type: the named baseline or a year (YYYY) */
|
|
14
13
|
type BaselineOption = BaselineName | number;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/configs/baseline.d.ts
|
|
17
14
|
declare function baselineConfigs(opts?: {
|
|
18
15
|
available?: BaselineOption;
|
|
19
16
|
baseline?: BaselineOption;
|
|
@@ -51,8 +48,6 @@ declare function recommendedTsConfig(opts?: {
|
|
|
51
48
|
readonly files: readonly ["**/*.{ts,tsx}"];
|
|
52
49
|
readonly rules: Record<string, unknown>;
|
|
53
50
|
};
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/index.d.ts
|
|
56
51
|
declare const _default: {
|
|
57
52
|
readonly meta: {
|
|
58
53
|
readonly name: string;
|
|
@@ -65,5 +60,4 @@ declare const _default: {
|
|
|
65
60
|
readonly "recommended-ts": typeof recommendedTsConfig;
|
|
66
61
|
};
|
|
67
62
|
};
|
|
68
|
-
//#endregion
|
|
69
63
|
export { _default as default };
|