Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using eslint-plugin-es-x #56

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You might not need a transpiler or polyfills.

Or, you may be transpiling your own code but not prebuilt 3rd-party libraries - leaving you open to breakages when they use new language features.

[ESLint](https://eslint.org) supports targeting a specific ECMAScript version, and [eslint-plugin-es](https://github.com/mysticatea/eslint-plugin-es) allows forbidding individual language features. However when building applications, what we target are particular browser/runtime versions. This project lets you check compatibility by specifying those targets directly via a browserslist. It will figure out which individual features you can use, by looking up those targets in the [MDN compatibility dataset](https://github.com/mdn/browser-compat-data).
[ESLint](https://eslint.org) supports targeting a specific ECMAScript version, and [eslint-plugin-es-x](https://github.com/eslint-community/eslint-plugin-es-x) allows forbidding individual language features. However when building applications, what we target are particular browser/runtime versions. This project lets you check compatibility by specifying those targets directly via a browserslist. It will figure out which individual features you can use, by looking up those targets in the [MDN compatibility dataset](https://github.com/mdn/browser-compat-data).

## Scope

Expand Down Expand Up @@ -66,7 +66,7 @@ Contributions and [feedback](https://github.com/robatwilliams/es-compat/issues/1

- [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) - for browser APIs
- [doiuse](https://github.com/anandthakker/doiuse) - for CSS
- [eslint-plugin-es](https://github.com/mysticatea/eslint-plugin-es)\*
- [eslint-plugin-es-x](https://github.com/eslint-community/eslint-plugin-es-x) (formerly [eslint-plugin-es](https://github.com/mysticatea/eslint-plugin-es))\*
- [@mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)\*

\* Thanks to these projects in particular (and many others) for making this project possible.
2 changes: 1 addition & 1 deletion packages/check-es-compat/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const eslint = require('eslint');
const esPlugin = require('eslint-plugin-es');
const esPlugin = require('eslint-plugin-es-x');
const compatData = require('@mdn/browser-compat-data');
const { noRestrictedSyntaxPrototypeMethod } = require('./ruleOptionsUtil');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const eslint = require('eslint');
const esPlugin = require('eslint-plugin-es');
const esPlugin = require('eslint-plugin-es-x');
const compatData = require('@mdn/browser-compat-data');
const { noRestrictedSyntaxPrototypeMethod } = require('./ruleOptionsUtil');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const eslint = require('eslint');
const esPlugin = require('eslint-plugin-es');
const esPlugin = require('eslint-plugin-es-x');
const compatData = require('@mdn/browser-compat-data');
const { noRestrictedSyntaxPrototypeMethod } = require('./ruleOptionsUtil');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const eslint = require('eslint');
const esPlugin = require('eslint-plugin-es');
const esPlugin = require('eslint-plugin-es-x');
const compatData = require('@mdn/browser-compat-data');
const { noRestrictedSyntaxPrototypeMethod } = require('./ruleOptionsUtil');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const eslint = require('eslint');
const esPlugin = require('eslint-plugin-es');
const esPlugin = require('eslint-plugin-es-x');
const compatData = require('@mdn/browser-compat-data');
const { noRestrictedSyntaxPrototypeMethod } = require('./ruleOptionsUtil');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const eslint = require('eslint');
const compatData = require('@mdn/browser-compat-data');
const esPlugin = require('eslint-plugin-es');
const esPlugin = require('eslint-plugin-es-x');
const { noRestrictedSyntaxPrototypeMethod } = require('./ruleOptionsUtil');

const coreRules = new eslint.Linter().getRules();
Expand Down
26 changes: 13 additions & 13 deletions packages/eslint-plugin-ecmascript-compat/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/eslint-plugin-ecmascript-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"caniuse",
"kangax",
"eslint-plugin-compat",
"eslint-plugin-es"
"eslint-plugin-es",
"eslint-plugin-es-x"
],
"homepage": "https://github.com/robatwilliams/es-compat#readme",
"bugs": {
Expand All @@ -37,7 +38,7 @@
"dependencies": {
"@mdn/browser-compat-data": "^4.1.3",
"browserslist": "^4.8.0",
"eslint-plugin-es": "^4.1.0",
"eslint-plugin-es-x": "^5.4.0",
"lodash": "^4.17.21"
},
"devDependencies": {
Expand Down