mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Bumped vite, eslint, typescript, prettier and related plugins versions to latest (#623)
* Bumped vite, eslint, typescript, prettier and related plugins * Fixed unused arg * Fixed prettier warnings
This commit is contained in:
85
frontend/eslint.config.cjs
Normal file
85
frontend/eslint.config.cjs
Normal file
@@ -0,0 +1,85 @@
|
||||
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"),
|
||||
|
||||
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}"],
|
||||
}]);
|
||||
Reference in New Issue
Block a user