Skip to content

Commit

Permalink
Update ESLint configuration and dependencies; add eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
reiroop committed Nov 2, 2024
1 parent af93a8c commit 6b17ee5
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 47 deletions.
2 changes: 1 addition & 1 deletion eslint-vue-ts-recommended.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* 参考: https://zenn.dev/the_red/articles/5162f9dbbafca3
*/

// eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef
// eslint-disable-next-line no-undef
const typescriptEslintEslintRecommended = require('./node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended')

Check failure on line 12 in eslint-vue-ts-recommended.cjs

View workflow job for this annotation

GitHub Actions / Lint

A `require()` style import is forbidden

// eslint-disable-next-line no-undef
Expand Down
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pluginJs from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import globals from 'globals'
import tseslint from 'typescript-eslint'

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts,vue}'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/essential'],
{
files: ['**/*.vue'],
languageOptions: { parserOptions: { parser: tseslint.parser } }
}
]
130 changes: 89 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"serve": "vite preview",
"build": "vue-tsc --noEmit && vite build",
"build:watch": "vite build --watch",
"lint": "eslint --fix --ext .js,.ts,.vue --cache .",
"lint:nofix": "eslint --ext .js,.ts,.vue --cache .",
"lint": "eslint --fix --cache .",
"lint:nofix": "eslint --cache .",
"type-check": "vue-tsc --noEmit",
"gen-api": "esno ./scripts/generate-apis.ts",
"clean": "rimraf src/lib/apis/generated",
Expand All @@ -25,6 +25,7 @@
"vue-toastification": "^2.0.0-rc.5"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@heroicons/vue": "^2.1.5",
"@openapitools/openapi-generator-cli": "^2.15.3",
"@tailwindcss/typography": "^0.5.15",
Expand All @@ -39,13 +40,14 @@
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^14.1.3",
"autoprefixer": "^10.4.20",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-unused-imports": "^4.1.4",
"eslint-plugin-vue": "^9.27.0",
"eslint-plugin-vue": "^9.30.0",
"esno": "^4.8.0",
"execa": "^9.5.1",
"globals": "^15.11.0",
"msw": "^2.6.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
Expand All @@ -54,6 +56,7 @@
"tailwindcss": "^3.4.14",
"ts-morph": "^24.0.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8.12.2",
"vite": "^5.4.10",
"vue-tsc": "^2.1.10"
},
Expand Down
2 changes: 1 addition & 1 deletion public/mockServiceWorker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/* tslint:disable */

/**
Expand Down

0 comments on commit 6b17ee5

Please sign in to comment.