eslint-plugin-baseline-js 0.2.0 → 0.4.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/LICENSE +1 -1
- package/README.md +22 -8
- package/dist/index.cjs +31005 -30463
- package/dist/index.mjs +31004 -30463
- package/package.json +27 -20
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
# eslint-plugin-baseline-js
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
Enforce the JavaScript Baseline (`widely` / `newly` / `year`) with a single ESLint rule powered by web‑features.
|
|
8
8
|
This plugin delegates detection to eslint-plugin-es-x and ESLint core (plus a few small gap‑filling rules) and reports with one consistent Baseline message.
|
|
9
9
|
|
|
10
|
-
[![npm]
|
|
10
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
11
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
12
|
+
[![bundle][bundle-src]][bundle-href]
|
|
13
|
+
[![JSDocs][jsdocs-src]][jsdocs-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
11
15
|
[](https://github.com/3ru/eslint-plugin-baseline-js/actions/workflows/ci.yml)
|
|
12
|
-
[](https://github.com/3ru/eslint-plugin-baseline-js/actions/workflows/release.yml)
|
|
13
|
-
<img alt="License" src="https://img.shields.io/badge/license-MIT-blue" />
|
|
14
16
|
|
|
15
17
|
</div>
|
|
16
18
|
|
|
@@ -118,9 +120,9 @@ export default [
|
|
|
118
120
|
|
|
119
121
|
## How It Works
|
|
120
122
|
|
|
121
|
-
1. Data → `scripts/build-features.mjs`
|
|
122
|
-
- Extracts the minimal JavaScript subset from [`web‑features`](https://github.com/web-platform-dx/web-features) into `src/baseline/features.ts`.
|
|
123
|
-
2. Mapping → `src/baseline/mapping.
|
|
123
|
+
1. Data → `scripts/data/build-features.mjs`
|
|
124
|
+
- Extracts the minimal JavaScript subset from [`web‑features`](https://github.com/web-platform-dx/web-features) into `src/baseline/data/features.javascript.ts`.
|
|
125
|
+
2. Mapping → `src/baseline/mapping/syntax.ts`
|
|
124
126
|
- Maps web‑features IDs to underlying rules (prefer `eslint-plugin-es-x` / ESLint core; custom rules only when necessary).
|
|
125
127
|
3. Resolution → `src/baseline/resolve.ts`
|
|
126
128
|
- Classifies “beyond baseline” by bucket (`high/low/false → widely/newly/limited`) or year.
|
|
@@ -132,7 +134,7 @@ and shows which ones are currently mapped by this plugin.
|
|
|
132
134
|
|
|
133
135
|
- Report: [docs/coverage.md](docs/coverage.md)
|
|
134
136
|
- Regenerate locally: `pnpm gen:coverage`
|
|
135
|
-
-
|
|
137
|
+
- Generator: `scripts/coverage/generate-coverage.mjs`
|
|
136
138
|
|
|
137
139
|
## Options (rule)
|
|
138
140
|
|
|
@@ -156,3 +158,15 @@ The Baseline name and logos are Google trademarks. Logo assets are licensed unde
|
|
|
156
158
|
## License
|
|
157
159
|
|
|
158
160
|
MIT
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
[npm-version-src]: https://img.shields.io/npm/v/eslint-plugin-baseline-js?style=flat&colorA=080f12&colorB=1ea446
|
|
164
|
+
[npm-version-href]: https://npmjs.com/package/eslint-plugin-baseline-js
|
|
165
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/eslint-plugin-baseline-js?style=flat&colorA=080f12&colorB=1ea446
|
|
166
|
+
[npm-downloads-href]: https://npmjs.com/package/eslint-plugin-baseline-js
|
|
167
|
+
[bundle-src]: https://img.shields.io/bundlephobia/minzip/eslint-plugin-baseline-js?style=flat&colorA=080f12&colorB=1ea446&label=minzip
|
|
168
|
+
[bundle-href]: https://bundlephobia.com/result?p=eslint-plugin-baseline-js
|
|
169
|
+
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1ea446
|
|
170
|
+
[jsdocs-href]: https://www.jsdocs.io/package/eslint-plugin-baseline-js
|
|
171
|
+
[license-src]: https://img.shields.io/github/license/3ru/eslint-plugin-baseline-js.svg?style=flat&colorA=080f12&colorB=1ea446
|
|
172
|
+
[license-href]: https://github.com/3ru/eslint-plugin-baseline-js/blob/main/LICENSE
|