Skip to content
Open

update #3060

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
steps:
- uses: actions/[email protected]
- name: Set up NodeJS
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 18
- name: Cache node modules
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ repos:
- id: eslint
additional_dependencies:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- eslint-plugin-react-hooks@4.5.0
- eslint-plugin-react-hooks@7.0.1
args: ["--fix"]
files: frontend/src/
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down
52 changes: 0 additions & 52 deletions frontend/.eslintrc.json

This file was deleted.

78 changes: 78 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { defineConfig } from "eslint/config";
import { fixupConfigRules } from "@eslint/compat";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([{
extends: fixupConfigRules(compat.extends(
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
)),

languageOptions: {
globals: {
...globals.jest,
...globals.browser,
...globals.node,
},

ecmaVersion: 2021,
sourceType: "module",

parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
jsx: true,
},
},
},

settings: {
react: {
version: "detect",
},
},

rules: {
"react/prop-types": ["warn"],
"react/forbid-prop-types": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-fragments": ["off"],
"no-undef": "error",
"no-use-before-define": "off",
"import/no-unresolved": "off",

"id-length": ["error", {
min: 3,
exceptions: ["_", "id", "pk", "ip", "IP"],
}],

"no-warning-comments": "error",

"no-console": ["error", {
allow: ["debug", "error"],
}],

"no-unused-vars": ["error", {
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
args: "after-used",
}],

"import/prefer-default-export": "off",
},
}]);
Loading
Loading