-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add eslint, prettier and default vite gitignore to create-react-admin #9055
Conversation
Shall we consider eslint.config.js as the .eslintrc format will be deprecated. Source: https://eslint.org/docs/latest/use/configure/configuration-files |
It's currently a pain to use. We'll wait for it to be necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seing the new config files alright, but I'm having issues when running npm run lint
and npm run format
in the generated project:
❯ npm run lint
> lint
> eslint --fix --ext .js,.jsx,.ts,.tsx ./src
Oops! Something went wrong! :(
ESLint: 8.43.0
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
npm init @eslint/config
ESLint looked for configuration files in /home/slax57/workspaces/my-admin/src and its ancestors. If it found none, it then looked in your home directory.
If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat
and
❯ npm run format
> format
> prettier --write ./src
[error] Invalid configuration file `src/App.tsx`: Unexpected token 'export'
Do you have them too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting seems to work now.
However I see visual regressions:
- When choosing an option in the CLI, the whole section re-renders when the option changes
- Once the script has run, the message "Your application my-admin was successfully generated. blahblahblah" appears twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, everything looks good this time! 💪
Instructions to test the CLI are in its README