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

Remove style rules #1872

Closed
mightyiam opened this issue Nov 29, 2022 · 8 comments
Closed

Remove style rules #1872

mightyiam opened this issue Nov 29, 2022 · 8 comments

Comments

@mightyiam
Copy link
Member

ESLint style rules with fixers can only go so far. Especially as syntax surface grows. See TypeScript's indent problems.

Deterministic re-formatting blows ESLint's formatting capabilities out of the water, and actually solves the problem.

Some of our users already report disabling our style rules and using a deterministic re-formatter.
One of our contributors even opened a PR to separate them (#1868).

Much effort went into Standard's style rules, granted. Yet:

  1. Style choices that actually matter are probably in agreement between Standard and formatters.
  2. Those that don't matter... don't matter.

I suggest:

  1. Remove formatting rules from Standard altogether.
  2. Edit the project's long form title to JavaScript Standard Lint (any better ideas?).

Users would be advised to use a deterministic re-formatter, such as Prettier and dprint.

Configuration options for those re-formatters which result in a Standard-like style would be provided, in case our users would like to minimize code changes.

Our users would thank us, I imagine.

We would be relieving ourselves of providing an inferior solution to a problem for which a superior solution is readily available.

@theoludwig
Copy link
Member

I agree with the idea of removing ESLint formatting rules.

This is also a good explanation to understand the difference Linter vs Prettier: https://prettier.io/docs/en/comparison.html.

@voxpelli
Copy link
Member

I disagree with removing them. It creates a need to add two tools rather than one. I prefer having it all in one tool.

@LinusU
Copy link
Member

LinusU commented Dec 14, 2022

Personally, I would still like Standard to be an all in one tool.

Going in the other direction, I think it would be nice to have formatting built in as well. E.g. one approach could be to remove the eslint style-rules, and add eslint-plugin-dprint that would cover all those rules. Then standard --fix would format your code using dprint. Potentially we'd want to to switch standard into standard lint, and standard --fix into standard format then. Well, this is probably a topic for a separate issue 😅

@mightyiam
Copy link
Member Author

I agree that the one tool prospect is in theory preferable. How about we leave this issue open until something is decided. @LinusU , I will ask you something about your suggestion in another issue.

@jankapunkt
Copy link
Contributor

Bumping up this topic, due to high relevancy, I wanted to add that I chose Standard, because it's zero config and simply works. Install - run - get results.

Therefore I vote to stay opinionated and make a hard decisions but keep this project alive and stay zero-config.

Configurable tools are basically all JS tools in 2023 and it's simply annoying. Keeping these concepts abstracted would be awesome!

I could also imagine to install a second package to include formatting, like standard-format-dpring or standard-format-prettier and if they are installed then standard --fix will format according to the specific rules. If they are not installed, the command is unavailable or raises and error etc.

@wesleytodd
Copy link

Strongly opposed removing the formatting style opinions and support from standard. We as an ecosystem for sure don't need two tools with this much overlap, and linting is always more important than formatting.

@mightyiam
Copy link
Member Author

Closing in favor of #1949.

@voxpelli
Copy link
Member

Discussion on what to do continues in the above issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

6 participants