Skip to content

Commit

Permalink
chore: use @hono/eslint-config (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Dec 13, 2023
1 parent 60fef03 commit a469382
Show file tree
Hide file tree
Showing 5 changed files with 706 additions and 817 deletions.
64 changes: 3 additions & 61 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
const { defineConfig } = require('eslint-define-config')

module.exports = defineConfig({
root: true,
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2021,
},
plugins: ['@typescript-eslint', 'import'],
globals: {
fetch: false,
Response: false,
Request: false,
addEventListener: false,
},
rules: {
quotes: ['error', 'single'],
semi: ['error', 'never'],
'no-debugger': ['error'],
'no-empty': ['warn', { allowEmptyCatch: true }],
'no-process-exit': 'off',
'no-useless-escape': 'off',
'prefer-const': [
'warn',
{
destructuring: 'all',
},
],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Function: false,
'{}': false,
},
},
],
'sort-imports': 0,
'import/order': [2, { alphabetize: { order: 'asc' } }],

'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',

'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
},
})
module.exports = {
extends: ['@hono/eslint-config'],
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@
"node": ">=18.14.1"
},
"scripts": {
"build": "yarn workspaces foreach run build"
"build": "yarn workspaces foreach run build",
"lint": "eslint 'packages/**/*.{ts,tsx}'",
"lint:fix": "eslint --fix 'packages/**/*.{ts,tsx}'"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@hono/eslint-config": "^0.0.1",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-define-config": "^1.23.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
"eslint": "^8.55.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
}
Expand Down
1 change: 1 addition & 0 deletions packages/dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"homepage": "https://github.com/honojs/vite-plugins",
"devDependencies": {
"@playwright/test": "^1.37.1",
"glob": "^10.3.10",
"hono": "^3.5.8",
"playwright": "^1.39.0",
"publint": "^0.2.5",
Expand Down
Loading

0 comments on commit a469382

Please sign in to comment.