Skip to content

Commit

Permalink
breaking: add ESLint 6+ as peer dependency and drop ESLint 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Sep 7, 2020
1 parent 92b4a98 commit 3171cf8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ jobs:
- run: yarn lint
- run: yarn update && git diff --exit-code
- run: yarn test:coverage --runInBand
- run: yarn add --dev eslint@5 && yarn test --runInBand
- run: yarn add --dev eslint@6 && yarn test --runInBand
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## ❗️Requirements

- [ESLint](https://eslint.org/) `>= 5`
- [ESLint](https://eslint.org/) `>= 6`
- [Node.js](https://nodejs.org/) `10.* || 12.* || >= 14`

## 🚀 Usage
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/traverser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

module.exports = getTraverser;

/* eslint node/no-unpublished-require:"off", node/no-missing-require:"off" */

function getTraverser() {
let traverser;
try {
// eslint-disable-next-line node/no-unpublished-require
traverser = require('eslint/lib/shared/traverser'); // eslint >= 6
} catch {
// eslint-disable-next-line node/no-unpublished-require, node/no-missing-require
traverser = require('eslint/lib/util/traverser'); // eslint < 6
}
return traverser;
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"engines": {
"node": "10.* || 12.* || >= 14"
},
"peerDependencies": {
"eslint": ">= 6"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ember-cli/eslint-plugin-ember/issues"
Expand Down

0 comments on commit 3171cf8

Please sign in to comment.