Skip to content

Commit

Permalink
feat: drop support for eslint <7
Browse files Browse the repository at this point in the history
  • Loading branch information
roikoren755 committed Dec 16, 2021
1 parent dc6e8b4 commit 2eef8da
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-foxes-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-es-roikoren': major
---

feat: drop support for eslint <7
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

strategy:
matrix:
eslint: [5, 6, 7, 8]
eslint: [7, 8]
node: [12, 14, 16]
os: [ubuntu-latest]
include:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"watch": "mocha tests/**/*.ts --reporter progress --watch"
},
"peerDependencies": {
"eslint": "^5 || ^6 || ^7 || ^8"
"eslint": "^7 || ^8"
},
"resolutions": {
"prettier": "2.5.1"
Expand Down
11 changes: 2 additions & 9 deletions tests/src/rules/no-optional-chaining.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
// import { AST_TOKEN_TYPES } from '@typescript-eslint/types';
import { AST_TOKEN_TYPES } from '@typescript-eslint/types';

import rule from '../../../src/rules/no-optional-chaining';
import { RuleTester } from '../../tester';

const error = {
messageId: 'forbidden' as const,
line: 1,
// TODO - type should be AST_TOKEN_TYPES.Punctuator, but it doesn't return as such in eslint@6
// TODO - we should revert this change when dropping support for eslint@6
// type: AST_TOKEN_TYPES.Punctuator,
data: {},
};
const error = { messageId: 'forbidden' as const, line: 1, type: AST_TOKEN_TYPES.Punctuator, data: {} };

if (!RuleTester.isSupported(2020)) {
console.log('Skip the tests of no-optional-chaining.');
Expand Down

0 comments on commit 2eef8da

Please sign in to comment.