eslint-plugin-baseline-js 0.4.2 → 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/dist/index.d.cts DELETED
@@ -1,58 +0,0 @@
1
- import { Rule } from "eslint";
2
-
3
- //#region src/config.d.ts
4
-
5
- /**
6
- * Named constants for Baseline string options.
7
- * Prefer using these to avoid typos in user configs.
8
- */
9
- declare const BASELINE: {
10
- readonly WIDELY: "widely";
11
- readonly NEWLY: "newly";
12
- };
13
- /** String-only Baseline names*/
14
- type BaselineName = (typeof BASELINE)[keyof typeof BASELINE];
15
- /** Final option type: the named baseline or a year (YYYY) */
16
- type BaselineOption = BaselineName | number;
17
- //#endregion
18
- //#region src/configs/baseline.d.ts
19
-
20
- /**
21
- * Recommended config: enable Baseline with Web APIs and JS builtins detection on auto preset.
22
- * - baseline: defaults to 'widely'
23
- * - includeWebApis/includeJsBuiltins: { preset: 'auto' }
24
- */
25
- declare function recommendedConfig(opts?: {
26
- available?: BaselineOption;
27
- baseline?: BaselineOption;
28
- env?: "browser" | "worker" | "node";
29
- level?: "error" | "warn";
30
- }): {
31
- readonly files: readonly ["**/*.{js,cjs,mjs,jsx}"];
32
- readonly rules: Record<string, unknown>;
33
- };
34
- /**
35
- * Recommended config for TypeScript-aware projects:
36
- * - Uses 'type-aware' preset to require type information for instance-member checks.
37
- * - Falls back gracefully when types are unavailable (instance checks are skipped by the rule).
38
- */
39
- declare function recommendedTsConfig(opts?: {
40
- available?: BaselineOption;
41
- baseline?: BaselineOption;
42
- env?: "browser" | "worker" | "node";
43
- level?: "error" | "warn";
44
- }): {
45
- readonly files: readonly ["**/*.{ts,tsx}"];
46
- readonly rules: Record<string, unknown>;
47
- };
48
- //#endregion
49
- //#region src/index.d.ts
50
- declare const _default: {
51
- readonly rules: Record<string, Rule.RuleModule>;
52
- readonly configs: {
53
- readonly recommended: typeof recommendedConfig;
54
- readonly "recommended-ts": typeof recommendedTsConfig;
55
- };
56
- };
57
- //#endregion
58
- export { BASELINE, _default as default };