Skip to content

Commit

Permalink
chore(eslint-config): use modern plugins alternatives (#724)
Browse files Browse the repository at this point in the history
* chore(eslint-config): use modern plugins alternatives

* chore: migrate missing ones

* chore: migrate eslint plugin comments

* fix(eslint): update configuration

* chore: bump eslint dev deps

* chore: add changeset
  • Loading branch information
Jayllyz authored Sep 7, 2024
1 parent c5fb51f commit f7a950a
Show file tree
Hide file tree
Showing 7 changed files with 432 additions and 379 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-lamps-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hono/eslint-config': minor
---

Migrate to maintained and improved plugin alternatives
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
"@cloudflare/workers-types": "^4.20230307.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.55.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-node": "^11.1.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.0",
"eslint-plugin-import-x": "^4.1.1",
"eslint-plugin-n": "^17.10.2",
"jest": "^29.5.0",
"jest-environment-miniflare": "^2.14.1",
"npm-run-all": "^4.1.5",
"npm-run-all2": "^6.2.2",
"prettier": "^2.7.1",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
Expand Down
20 changes: 10 additions & 10 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = defineConfig({
root: true,
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:n/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
Expand All @@ -13,7 +13,7 @@ module.exports = defineConfig({
sourceType: 'module',
ecmaVersion: 2021,
},
plugins: ['@typescript-eslint', 'import'],
plugins: ['@typescript-eslint', 'import-x'],
globals: {
fetch: false,
Response: false,
Expand Down Expand Up @@ -44,15 +44,15 @@ module.exports = defineConfig({
},
],

'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import/no-duplicates': 'error',
'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import-x/no-duplicates': 'error',

'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'node/no-deprecated-api': 'off',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'n/no-missing-import': 'off',
'n/no-missing-require': 'off',
'n/no-deprecated-api': 'off',
'n/no-unpublished-import': 'off',
'n/no-unpublished-require': 'off',
'n/no-unsupported-features/es-syntax': 'off',

'@typescript-eslint/ban-types': [
'error',
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
},
"homepage": "https://github.com/honojs/middleware",
"peerDependencies": {
"eslint": "^8.0.0",
"eslint": "^8.57.0",
"typescript": "^5.0.0"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-node": "^11.1.0"
"eslint-define-config": "^2.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.1.1",
"eslint-plugin-n": "^17.10.2"
},
"devDependencies": {
"@types/eslint": "^8",
"eslint": "^8.55.0",
"eslint": "^8.57.0",
"typescript": "^5.3.3"
}
}
8 changes: 4 additions & 4 deletions packages/graphql-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
},
"devDependencies": {
"@cloudflare/workers-types": "^3.14.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
"@types/jest": "^28.1.4",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"eslint": "^8.14.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.4.0",
"eslint-import-resolver-typescript": "^2.7.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-import-x": "^4.1.1",
"eslint-plugin-n": "^17.10.2",
"hono": "^4.0.2",
"jest": "^28.1.2",
"jest-environment-miniflare": "^2.6.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/sentry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
},
"devDependencies": {
"@cloudflare/workers-types": "^3.14.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
"@types/jest": "^28.1.4",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"eslint": "^8.21.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.6.0",
"eslint-import-resolver-typescript": "^3.4.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-import-x": "^4.1.1",
"eslint-plugin-n": "^17.10.2",
"hono": "^3.11.7",
"jest": "^28.1.2",
"jest-environment-miniflare": "^2.6.0",
Expand Down
Loading

0 comments on commit f7a950a

Please sign in to comment.