Files
lcbp3/frontend/eslint.config.mjs
T
admin 1d3479770b
Build and Deploy / deploy (push) Has been cancelled
260320:1131 Refactor Overrall #01
2026-03-20 11:31:27 +07:00

75 lines
1.7 KiB
JavaScript

import js from "@eslint/js";
import globals from "globals";
import typescriptParser from "@typescript-eslint/parser";
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
import reactHooksPlugin from "eslint-plugin-react-hooks";
const eslintConfig = [
js.configs.recommended,
{
files: ["**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
...globals.es2021,
},
},
rules: {
"no-console": "warn",
"no-unused-vars": "warn",
},
},
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
...globals.es2021,
},
},
plugins: {
"@typescript-eslint": typescriptPlugin,
"react-hooks": reactHooksPlugin,
},
rules: {
"no-console": "warn",
"no-unused-vars": "off",
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
}],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
},
// Ignore config files and build outputs
{
ignores: [
"node_modules/**",
".next/**",
"out/**",
"dist/**",
"build/**",
"*.config.js",
"*.config.mjs",
"*.config.ts",
],
},
];
export default eslintConfig;