Skip to content

Commit

Permalink
Drop @typescript-eslint v5
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota-ka committed Feb 9, 2024
1 parent 12fd74c commit 581445a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
7 changes: 7 additions & 0 deletions base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log

## v0.28.0

### Breaking changes

- Require typescript-eslint v6.
- Extend `@typescript-eslint/recommended-type-checked` and `@typescript-eslint/stylistic-type-checked`.

## v0.27.0

### Non-breaking change
Expand Down
14 changes: 7 additions & 7 deletions base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

Note that the following packages are peer dependencies of this library, which need to be installed separately.

| Package | Version |
| ---------------------------------------------------------------------------------------------------- | ---------- |
| [`@typescript-eslint/eslint-plugin`](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) | `5 \|\| 6` |
| [`@typescript-eslint/parser`](https://www.npmjs.com/package/@typescript-eslint/parser) | `5 \|\| 6` |
| [`eslint`](https://www.npmjs.com/package/eslint) | `8` |
| [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier) | `*` |
| [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) | `^2.25.0` |
| Package | Version |
| ---------------------------------------------------------------------------------------------------- | --------- |
| [`@typescript-eslint/eslint-plugin`](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) | `6` |
| [`@typescript-eslint/parser`](https://www.npmjs.com/package/@typescript-eslint/parser) | `6` |
| [`eslint`](https://www.npmjs.com/package/eslint) | `8` |
| [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier) | `*` |
| [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) | `^2.25.0` |

### Using [npm](https://www.npmjs.com/)

Expand Down
16 changes: 2 additions & 14 deletions base/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:import/typescript',
'prettier',
],
Expand All @@ -20,9 +20,6 @@ module.exports = {
},
plugins: ['@typescript-eslint', 'import'],
rules: {
// ESLint core rules superseded by @typescript-eslint
'dot-notation': 'off',

// ESlint core
curly: 'error',
'default-case-last': 'error',
Expand Down Expand Up @@ -65,7 +62,6 @@ module.exports = {
objectLiteralTypeAssertions: 'never',
},
],
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
Expand Down Expand Up @@ -116,7 +112,6 @@ module.exports = {
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
],
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
Expand All @@ -128,19 +123,12 @@ module.exports = {
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': ['error', { allowConstantLoopConditions: true }],
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
'@typescript-eslint/no-unused-expressions': ['error', { enforceForJSX: true }],
'@typescript-eslint/no-unused-vars': 'off', // Let TypeScript check it
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
Expand Down
4 changes: 2 additions & 2 deletions base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"homepage": "https://github.com/herp-inc/eslint-config",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "5 || 6",
"@typescript-eslint/parser": "5 || 6",
"@typescript-eslint/eslint-plugin": "6",
"@typescript-eslint/parser": "6",
"eslint": "8",
"eslint-config-prettier": "*",
"eslint-plugin-import": "^2.25.0"
Expand Down

0 comments on commit 581445a

Please sign in to comment.