eslint-plugin-baseline-js 0.5.0 → 0.6.0
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 +5 -3
- package/dist/index.d.mts +10 -2
- package/dist/index.mjs +9922 -9609
- package/package.json +19 -21
- package/dist/index.cjs +0 -62759
- package/dist/index.d.cts +0 -58
package/README.md
CHANGED
|
@@ -144,12 +144,14 @@ 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
|
-
## Baseline for HTML and
|
|
147
|
+
## Baseline for HTML, CSS, and React
|
|
148
148
|
|
|
149
|
-
Baseline works best when HTML, CSS, and
|
|
149
|
+
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:
|
|
150
150
|
|
|
151
151
|
- ESLint for CSS: https://github.com/eslint/css
|
|
152
|
-
- HTML ESLint: https://github.com/yeonjuan/html-eslint
|
|
152
|
+
- HTML ESLint (HTML): https://github.com/yeonjuan/html-eslint
|
|
153
|
+
- HTML ESLint (React): https://github.com/yeonjuan/html-eslint/tree/main/packages/eslint-plugin-react
|
|
154
|
+
|
|
153
155
|
|
|
154
156
|
## Branding Note (Baseline)
|
|
155
157
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Rule } from "eslint";
|
|
2
2
|
|
|
3
3
|
//#region src/config.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Named constants for Baseline string options.
|
|
7
6
|
* Prefer using these to avoid typos in user configs.
|
|
@@ -16,7 +15,15 @@ type BaselineName = (typeof BASELINE)[keyof typeof BASELINE];
|
|
|
16
15
|
type BaselineOption = BaselineName | number;
|
|
17
16
|
//#endregion
|
|
18
17
|
//#region src/configs/baseline.d.ts
|
|
19
|
-
|
|
18
|
+
declare function baselineConfigs(opts?: {
|
|
19
|
+
available?: BaselineOption;
|
|
20
|
+
baseline?: BaselineOption;
|
|
21
|
+
env?: "browser" | "worker" | "node";
|
|
22
|
+
level?: "error" | "warn";
|
|
23
|
+
}): {
|
|
24
|
+
files: string[];
|
|
25
|
+
rules: Record<string, unknown>;
|
|
26
|
+
}[];
|
|
20
27
|
/**
|
|
21
28
|
* Recommended config: enable Baseline with Web APIs and JS builtins detection on auto preset.
|
|
22
29
|
* - baseline: defaults to 'widely'
|
|
@@ -50,6 +57,7 @@ declare function recommendedTsConfig(opts?: {
|
|
|
50
57
|
declare const _default: {
|
|
51
58
|
readonly rules: Record<string, Rule.RuleModule>;
|
|
52
59
|
readonly configs: {
|
|
60
|
+
readonly baseline: typeof baselineConfigs;
|
|
53
61
|
readonly recommended: typeof recommendedConfig;
|
|
54
62
|
readonly "recommended-ts": typeof recommendedTsConfig;
|
|
55
63
|
};
|