Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ESLint #1124

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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