31 lines
837 B
TypeScript
31 lines
837 B
TypeScript
import js from "@eslint/js";
|
|
import globals from "globals";
|
|
import tseslint from "typescript-eslint";
|
|
import { defineConfig, globalIgnores } from "eslint/config";
|
|
|
|
export default defineConfig(globalIgnores(["dist/*"]), [
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
|
|
plugins: { js },
|
|
extends: ["js/recommended"],
|
|
ignores: ["/dist/*"],
|
|
rules: {
|
|
"require-await": "error",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
args: "all",
|
|
argsIgnorePattern: "^_",
|
|
caughtErrors: "all",
|
|
caughtErrorsIgnorePattern: "^_",
|
|
destructuredArrayIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
},
|
|
languageOptions: { globals: globals.browser },
|
|
},
|
|
tseslint.configs.recommended,
|
|
]);
|