59 lines
1.7 KiB
JavaScript
59 lines
1.7 KiB
JavaScript
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
import globals from "globals";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import js from "@eslint/js";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
recommendedConfig: js.configs.recommended,
|
|
allConfig: js.configs.all
|
|
});
|
|
|
|
export default [{
|
|
ignores: [
|
|
"build",
|
|
"node_modules",
|
|
"src/asset/pdf",
|
|
"src/types/dist",
|
|
"stage",
|
|
"appearance",
|
|
],
|
|
}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), {
|
|
plugins: {
|
|
"@typescript-eslint": typescriptEslint,
|
|
},
|
|
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
...globals.browser,
|
|
},
|
|
|
|
parser: tsParser,
|
|
},
|
|
|
|
rules: {
|
|
semi: [2, "always"],
|
|
|
|
quotes: [2, "double", {
|
|
avoidEscape: true,
|
|
}],
|
|
|
|
"no-async-promise-executor": "off",
|
|
"no-prototype-builtins": "off",
|
|
"no-useless-escape": "off",
|
|
"no-irregular-whitespace": "off",
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
"@typescript-eslint/no-var-requires": "off",
|
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
},
|
|
}];
|