diff --git a/.changeset/beige-foxes-share.md b/.changeset/beige-foxes-share.md new file mode 100644 index 00000000..2371e278 --- /dev/null +++ b/.changeset/beige-foxes-share.md @@ -0,0 +1,5 @@ +--- +'eslint-plugin-es-roikoren': major +--- + +feat: drop support for eslint <7 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d045067..dd077601 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: - eslint: [5, 6, 7, 8] + eslint: [7, 8] node: [12, 14, 16] os: [ubuntu-latest] include: diff --git a/package.json b/package.json index 03a20361..802b0c4c 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/tests/src/rules/no-optional-chaining.ts b/tests/src/rules/no-optional-chaining.ts index 222ca7d0..9ce91f7d 100644 --- a/tests/src/rules/no-optional-chaining.ts +++ b/tests/src/rules/no-optional-chaining.ts @@ -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.');