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

Unnecessary package eslint-config-prettier (or template should also come with Prettier and configure it's usage) #8472

Closed
fernandocanizo opened this issue Jan 10, 2024 · 1 comment · Fixed by #8671

Comments

@fernandocanizo
Copy link
Contributor

Reproduction

Just do an pnpx create-remix and review package.json, it will have eslint-config-prettier. It also affects the official templates: express, haven't checked the rest.

System Info

Irrelevant, this is a report about unused extra dev-dependencies. Also the package manager used is irrelevant for this bug.

Used Package Manager

pnpm

Expected Behavior

To not have spurious packages installed by default.

Actual Behavior

Package eslint-config-prettier gets included in package.json, this package is for turning off Eslint style rules that may conflict with Prettier, but the template doesn't include Prettier, also to be really put into use, it has to be configured on Eslint configuration file in order to turn off style rules on Eslint.

So the current delivered way doesn't make sense.

I believe is a leftover artifact from PR #7597 , which on its first commit correctly adds configuration for this Eslint plugin by adding it to the extends field:

// ...
extends: [
  // ...
  "prettier",
],

But then, on commit ca6b95f, when adapting Eslint configuration for the remaining official templates, it completely forgets about it.

I was planning on starting a discussion to add a pre-configured development environment with basic industry-standard defaults setup from the start:

  • eslint only for errors
  • prettier for style
  • husky to add git hooks
  • lint-staged to only apply hooks to what's gonna be commited

But it seems, according to #7056 , that that's more pertaining to templates (aka stacks).

So in conclusion, package eslint-config-prettier shouldn't be part of the default installation.

@brophdawg11
Copy link
Contributor

Yeah this looks leftover - we'd be happy to accept a PR to remove this from the templates/stacks!

fernandocanizo added a commit to fernandocanizo/remix that referenced this issue Feb 2, 2024
Removes unused package `eslint-config-prettier` from all templates
that were installing it.
fernandocanizo added a commit to fernandocanizo/remix that referenced this issue Feb 2, 2024
In the context of remix-run#8472, add myself and then sort contributors file.
brophdawg11 added a commit that referenced this issue Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants