Skip to content

Commit

Permalink
refactor: renew ESLint config (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki authored Nov 24, 2024
1 parent b1e26e8 commit 568bf97
Show file tree
Hide file tree
Showing 8 changed files with 3,628 additions and 7,278 deletions.
18 changes: 0 additions & 18 deletions .prettierrc.mjs

This file was deleted.

15 changes: 14 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// @ts-check
import eslint from "@eslint/js";
import neverthrow from "@ninoseki/eslint-plugin-neverthrow";
import vitest from "@vitest/eslint-plugin";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import * as regexpPlugin from "eslint-plugin-regexp";
import pluginVue from "eslint-plugin-vue";
import tseslint from "typescript-eslint";
import vueParser from "vue-eslint-parser";
import simpleImportSort from "eslint-plugin-simple-import-sort";

// eslint-disable-next-line no-undef
const mode = process.env.NODE_ENV === "production" ? "error" : "warn";
Expand All @@ -17,8 +19,10 @@ export default tseslint.config(
...vueTsEslintConfig(),
regexpPlugin.configs["flat/recommended"],
{
plugins: { neverthrow },
plugins: { neverthrow, "simple-import-sort": simpleImportSort },
rules: {
"simple-import-sort/imports": mode,
"simple-import-sort/exports": mode,
"neverthrow/must-use-result": "error",
"no-console": mode,
"no-debugger": mode,
Expand All @@ -33,4 +37,13 @@ export default tseslint.config(
},
},
},
{
files: ["tests/**"],
plugins: {
vitest,
},
rules: {
...vitest.configs.recommended.rules,
},
}
);
Loading

0 comments on commit 568bf97

Please sign in to comment.