Skip to content
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

Use prettier for formatting instead of eslint #447

Conversation

mikavilpas
Copy link
Contributor

@mikavilpas mikavilpas commented Nov 17, 2024

  • npm run lint now checks formatting with prettier and eslint as discussed in ci: drop "eslint-plugin-prettier" dependency #445
  • npm run fixlint now fixes formatting with prettier --write and eslint --fix
  • lint-staged also uses npm run fixlint to keep things consistent
  • ci seems to already check formatting with prettier and eslint
  • added jsdoc type hints to the eslintrc.js file for autocompletion

Eslint now uses a blocklist instead of allowlist for ignoring files. It might be easier to not
accidentally ignore any new files with this approach.

Solves #445

- `npm run lint` now checks formatting with prettier and eslint
- `npm run fixlint` now fixes formatting with `prettier --write` and `eslint --fix`
- lint-staged also uses `npm run fixlint` to keep things consistent
- ci seems to already check formatting with prettier and eslint
- added jsdoc type hints to the eslintrc.js file for autocompletion

Eslint now uses a blocklist instead of allowlist for ignoring files. It might be easier to not
accidentally ignore any new files with this approach.

Solves neovim#445
@mikavilpas mikavilpas force-pushed the use-prettier-for-formatting-instead-of-eslint branch from 3025089 to f67e2ab Compare November 17, 2024 13:35
Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very helpful, thank you.

@justinmk justinmk merged commit e0f90cc into neovim:master Nov 17, 2024
10 checks passed
@mikavilpas mikavilpas deleted the use-prettier-for-formatting-instead-of-eslint branch November 17, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants