🔧 (.pre-commit-config.yaml): add eslint-plugin-react@latest as a dependency to improve linting for React components
🔧 (.eslintrc.json): update eslint configuration to include additional plugins, parser, parserOptions, and env settings to improve linting for React components and TypeScript files ♻️ (index.tsx): remove unnecessary empty line to improve code readability
This commit is contained in:
parent
8eef545acc
commit
33ad0430d3
3 changed files with 9 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ repos:
|
|||
- eslint-plugin-prettier
|
||||
- eslint-config-prettier
|
||||
- prettier
|
||||
- eslint-plugin-react@latest
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.4.2
|
||||
|
|
|
|||
|
|
@ -2,15 +2,18 @@
|
|||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
"standard"
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"plugins": ["react"],
|
||||
"plugins": ["react", "import-helpers", "prettier"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018
|
||||
"project": ["./tsconfig.node.json", "./tsconfig.json"],
|
||||
"extraFileExtensions:": [".mdx"],
|
||||
"extensions:": [".mdx"]
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ export default function ComponentsComponent({
|
|||
setPageIndex(1);
|
||||
setPageSize(20);
|
||||
}
|
||||
|
||||
return (
|
||||
<CardsWrapComponent
|
||||
onFileDrop={onFileDrop}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue