36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import pluginJs from "@eslint/js"
|
|
import simpleImportSort from "eslint-plugin-simple-import-sort"
|
|
import unusedImports from "eslint-plugin-unused-imports"
|
|
import globals from "globals"
|
|
import tseslint from "typescript-eslint"
|
|
|
|
export default [
|
|
{ files: ["**/*.{js,mjs,cjs,ts}"] },
|
|
{ languageOptions: { globals: globals.browser } },
|
|
pluginJs.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
plugins: {
|
|
"simple-import-sort": simpleImportSort,
|
|
"unused-imports": unusedImports,
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-namespace": "off",
|
|
"simple-import-sort/imports": "error",
|
|
"simple-import-sort/exports": "error",
|
|
"no-unused-vars": "off", // Turn off base rule
|
|
"unused-imports/no-unused-imports": "error", // Enable plugin rule
|
|
"unused-imports/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
vars: "all",
|
|
varsIgnorePattern: "^_",
|
|
args: "after-used",
|
|
argsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
]
|