2024-06-14 10:51:38 +00:00
|
|
|
// @ts-check
|
2024-06-14 11:34:56 +00:00
|
|
|
|
2024-06-14 11:09:53 +00:00
|
|
|
import eslint from "@eslint/js";
|
|
|
|
import tseslint from "typescript-eslint";
|
|
|
|
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
2024-06-14 11:34:56 +00:00
|
|
|
import globals from "globals";
|
2024-06-14 10:51:38 +00:00
|
|
|
|
|
|
|
export default tseslint.config(
|
2024-06-14 11:09:53 +00:00
|
|
|
{
|
|
|
|
ignores: [
|
|
|
|
"**/node_modules/",
|
|
|
|
"**/dist/",
|
|
|
|
"**/build/",
|
2024-06-14 11:15:36 +00:00
|
|
|
"**/assets/",
|
2024-06-14 11:09:53 +00:00
|
|
|
"**/out/",
|
|
|
|
"**/coverage/",
|
|
|
|
"**/lib/",
|
|
|
|
"**/esm/",
|
|
|
|
"**/cjs/",
|
|
|
|
"**/playwright-report/",
|
|
|
|
"**/playwright-coverage/",
|
|
|
|
"**/playwright-screenshots/",
|
|
|
|
"**/playwright-videos",
|
2024-06-14 11:34:56 +00:00
|
|
|
"**/webpack.config.js", // TODO: Remove this ignore
|
|
|
|
"**/service-worker.js", // TODO: Remove this ignore
|
|
|
|
"**/Static/", // TODO: Remove this ignore
|
2024-06-14 11:09:53 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
eslint.configs.recommended,
|
2024-06-14 11:34:56 +00:00
|
|
|
...tseslint.configs.recommended, // TODO: make this strict and not recommended
|
2024-06-14 11:09:53 +00:00
|
|
|
eslintPluginPrettierRecommended,
|
2024-06-14 11:34:56 +00:00
|
|
|
{
|
|
|
|
rules: {
|
|
|
|
"no-control-regex": "off", // TODO: Remove this rule
|
|
|
|
"@typescript-eslint/no-explicit-any": "off", // TODO: Remove this rule
|
|
|
|
"@typescript-eslint/no-var-requires": "off", // TODO: Remove this rule
|
|
|
|
"@typescript-eslint/no-duplicate-enum-values": "off", // TODO: Remove this rule
|
|
|
|
"no-constant-binary-expression": "off", // TODO: Remove this rule
|
|
|
|
"@typescript-eslint/ban-ts-comment": "off", // TODO: Remove this rule
|
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
argsIgnorePattern: "^_",
|
|
|
|
varsIgnorePattern: "^_",
|
|
|
|
caughtErrorsIgnorePattern: "^_",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
languageOptions: {
|
|
|
|
globals: {
|
|
|
|
...globals.browser,
|
|
|
|
...globals.node,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-06-14 11:01:14 +00:00
|
|
|
);
|