Skip to content

Commit

Permalink
chore: add eslint and update devDependencies (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Feb 21, 2024
1 parent eb90b83 commit 53d5256
Show file tree
Hide file tree
Showing 6 changed files with 1,394 additions and 836 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

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"
}
}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,26 @@
"hono": "3.x"
},
"devDependencies": {
"@hono/eslint-config": "^0.0.3",
"@mdx-js/rollup": "^2.3.0",
"@playwright/test": "^1.37.0",
"@types/babel__core": "^7.20.1",
"@types/babel__generator": "^7.6.4",
"@types/babel__traverse": "^7.20.1",
"@types/glob": "^8.1.0",
"esbuild": "^0.19.2",
"eslint": "^8.55.0",
"glob": "^10.3.10",
"hono": "3.6.0",
"hono": "^3.11.7",
"jsdom": "^22.1.0",
"np": "^7.7.0",
"npm-run-all": "^4.1.5",
"publint": "^0.1.12",
"rimraf": "^5.0.1",
"tsup": "^7.2.0",
"typescript": "5.0",
"vite": "^4.4.9",
"vitest": "^0.31.4"
"typescript": "^5.3.3",
"vite": "^5.0.8",
"vitest": "^1.0.4"
},
"engines": {
"node": ">=18.14.1"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"esModuleInterop": true,
"strict": true,
"declaration": true,
Expand Down
Loading

0 comments on commit 53d5256

Please sign in to comment.