Skip to content

Commit

Permalink
chore(eslint): migrate ESLint configuration from .eslintrc.cjs to esl…
Browse files Browse the repository at this point in the history
…int.config.mjs
  • Loading branch information
WMXPY committed Nov 7, 2024
1 parent 54a78b8 commit 3d7564d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 57 deletions.
57 changes: 0 additions & 57 deletions .eslintrc.cjs

This file was deleted.

64 changes: 64 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import typescriptParser from "@typescript-eslint/parser";

export default [
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
sourceType: "module",
},
},
},
{
plugins: {
"@typescript-eslint": typescriptEslint,
},
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
},
],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
functions: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
},
],
"sort-imports": [
"error",
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
allowSeparatedGroups: false,
memberSyntaxSortOrder: [
"none",
"all",
"multiple",
"single",
],
},
],
quotes: [
"error",
"double",
{
avoidEscape: true,
},
],
semi: [
"error",
"always",
],
},
},
];

0 comments on commit 3d7564d

Please sign in to comment.