Skip to content

Commit

Permalink
chore: update ESLint (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki authored Oct 13, 2024
1 parent 270c9e9 commit 5537a3e
Show file tree
Hide file tree
Showing 5 changed files with 772 additions and 884 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ jobs:
defaults:
run:
working-directory: ./frontend
strategy:
matrix:
node-version:
- 20
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install npm dependencies
Expand All @@ -39,16 +35,12 @@ jobs:
defaults:
run:
working-directory: ./frontend
strategy:
matrix:
node-version:
- 20
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install npm dependencies
Expand Down
22 changes: 0 additions & 22 deletions frontend/.eslintrc.cjs

This file was deleted.

37 changes: 37 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import pluginVitest from "@vitest/eslint-plugin"
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting"
import vueTsEslintConfig from "@vue/eslint-config-typescript"
import simpleImportSort from "eslint-plugin-simple-import-sort"
import pluginVue from "eslint-plugin-vue"


const mode = process.env.NODE_ENV === "production" ? "error" : "warn"

export default [
{
name: "app/files-to-lint",
files: ["**/*.{ts,mts,tsx,vue}"]
},
{
name: "app/files-to-ignore",
ignores: ["**/dist/**", "**/dist-ssr/**", "**/coverage/**"]
},
...pluginVue.configs["flat/essential"],
...vueTsEslintConfig(),
{
...pluginVitest.configs.recommended,
files: ["src/**/__tests__/*"]
},
skipFormatting,
{
plugins: {
"simple-import-sort": simpleImportSort
},
rules: {
"simple-import-sort/imports": mode,
"simple-import-sort/exports": mode,
"no-console": mode,
"no-debugger": mode
}
}
]
Loading

0 comments on commit 5537a3e

Please sign in to comment.