Skip to content

Commit

Permalink
fix: use eslint.module.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ruicsh committed May 20, 2024
1 parent 02af9cf commit 1f06a38
Show file tree
Hide file tree
Showing 33 changed files with 2,291 additions and 3,037 deletions.
35 changes: 0 additions & 35 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.1
20.13.1
48 changes: 48 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import perfectionist from "eslint-plugin-perfectionist";
import unicorn from "eslint-plugin-unicorn";
import vitest from "eslint-plugin-vitest";
import globals from "globals";
import tseslint from "typescript-eslint";

export default [
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
},
js.configs.recommended,
...tseslint.configs.recommended,
unicorn.configs["flat/recommended"],
prettier,
{
plugins: {
perfectionist,
},
rules: {
...perfectionist.configs["recommended-alphabetical"].rules,
"perfectionist/sort-imports": "off",
},
},
{
files: ["*.test.ts*"],
languageOptions: {
globals: { ...vitest.environments.env.globals },
},
plugins: {
vitest,
},
rules: {
...vitest.configs.recommended.rules,
},
},
{
rules: {
"unicorn/no-array-callback-reference": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off",
},
},
];
Loading

0 comments on commit 1f06a38

Please sign in to comment.