-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite migration: ESLint fixes #155
base: develop
Are you sure you want to change the base?
Conversation
I've to check if everything works as expected.
These variables are exctracted from |
This is cleaner. |
I just merged #156, so you can re-apply the linting. Maybe you should create a new PR instead? |
jsconfig.json was loaded by editors such as vscode so their LSP could resolve aliases
Follow-up to #154
eslint errors/warnings and applied fixes:
React
no-unused-vars
Remove unused React imports.
no-class-assign
and otherno-unused-vars
Disable these two rules. The second error was often raised on unused function arguments or object destructured properties that I believe were left for better readability and self-documentation.
no-case-declarations
Add
{}
.no-undef
Add
// eslint-disable-next-line
.This error was raised on
DAKARA_VERSION
,DAKARA_BUGTRACKER
andDAKARA_PROJECT_HOMEPAGE
that are defined invite.config.js
.react/display-name
Add
// eslint-disable-next-line
on four decorators in https://github.com/NextFire/dakara-client-web/blob/vite-eslint/src/components/adapted/ReactRouterDom.jsx.react/no-unescaped-entities
Escape characters.
react-refresh/only-export-components
Name some default exports + move two shared const to https://github.com/NextFire/dakara-client-web/blob/vite-eslint/src/utils/permissions.js.
react/prop-types
Add or complete
propTypes
on various components.I often had to guess when to add
isRequired
or not…