2024-08-21 03:40:32 +00:00
|
|
|
import globals from "globals";
|
|
|
|
import pluginJs from "@eslint/js";
|
|
|
|
import tseslint from "typescript-eslint";
|
|
|
|
|
|
|
|
export default [
|
|
|
|
{files: ["**/*.{js,mjs,cjs,ts}"]},
|
|
|
|
{languageOptions: {globals: globals.browser}},
|
|
|
|
pluginJs.configs.recommended,
|
|
|
|
...tseslint.configs.recommended,
|
2024-08-22 01:48:58 +00:00
|
|
|
{
|
|
|
|
rules: {
|
|
|
|
"semi": [2, "always"],
|
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
// https://typescript-eslint.io/rules/no-unused-vars/#benefits-over-typescript
|
|
|
|
{
|
|
|
|
"args": "all",
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"caughtErrors": "all",
|
|
|
|
"caughtErrorsIgnorePattern": "^_",
|
|
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
},
|
2024-08-21 03:40:32 +00:00
|
|
|
];
|