Files
helm-dashboard/frontend/eslint.config.cjs
yuri-sakharov f01c19f330 Bump a lot of packages (#625)
* Bump react, luxon, swagger, uuid

* Improved imports

* Fixed vulnerabilities

* Bump highlight.js and added eslint-plugin-react-hooks with fixes

* Bump compare-versions, html-react-parser, react-intersection-observer, react-modern-drawer

* Bump @tanstack/react-query, react-select

* Added tsc:check script
2025-11-26 18:44:59 +02:00

91 lines
2.1 KiB
JavaScript

const {
defineConfig,
} = require("eslint/config");
const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const react = require("eslint-plugin-react");
const js = require("@eslint/js");
const {
FlatCompat,
} = require("@eslint/eslintrc");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = defineConfig([{
languageOptions: {
globals: {
...globals.browser,
heap: "writable",
DD_RUM: "writable",
},
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: { jsx: true },
project: "./tsconfig.json",
},
},
extends: compat.extends(
"enpitech",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking", TODO enable and fix the types
),
plugins: {
"@typescript-eslint": typescriptEslint,
react,
},
settings: {
react: {
version: "detect"
},
},
rules: {
"no-console": ["error", {
allow: ["error"],
}],
"no-alert": "error",
"no-debugger": "error",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": ["error", {
vars: "all",
args: "after-used",
ignoreRestSiblings: true,
}],
"react/react-in-jsx-scope": "off",
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"@typescript-eslint/no-explicit-any": "warn",
},
}, {
languageOptions: {
globals: {
...globals.node,
},
sourceType: "script",
parserOptions: {},
},
files: ["**/.eslintrc.{js,cjs}"],
}]);