ci: add prettier linting #264
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
JavaScript files are linted for stylistic formatting using @stylistic/eslint-plugin.
Other types of files are not linted for formatting.
Assessment
Prettier is used in some other Cypress repos to provide consistent code formatting, in addition to @stylistic/eslint-plugin. It supports several file types including the following used in this repo:
JavaScript formatting is already the responsibility of @stylistic/eslint-plugin in this repo. Prettier has a different opinion about JavaScript and the two cannot be used together. Cypress itself does not use Prettier to format code - see CONTRIBUTING > Coding Style.
Change
format
format:check
to circle.yml pipelinelint
job and to .husky/pre-commitVerification
On Ubuntu
24.04.2
LTS, Node.js22.16.0
LTSExecute
and confirm
Execute
and confirm that only the following file types are linted by Prettier at this time. Each should also be annotated with
(unchanged)
:*.yml
*.json