question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document freezing of stylistic rules

See original GitHub issue

My proposal may seem too loud to someone, but it is discussion.

Our main problem is that we can never satisfy stylistic preferences. There will always be someone who wants an extra space or line break. Stylistic rules grow endlessly and create more and more problems. It’s getting harder and harder to maintain.

Eslint has https://eslint.org/blog/2020/05/changes-to-rules-policies and says:

Stylistic rules are frozen - we won’t be adding any more options to stylistic rules. We’ve learned that there’s no way to satisfy everyone’s personal preferences, and most of the rules already have a lot of difficult-to-understand options. Stylistic rules are those related to spacing, conventions, and generally anything that does not highlight an error or a better way to do something. Update 2021-01-29: We clarified in the README that we will still support newly-added ECMAScript features.

Honestly, I think we should do the same.

Currently prettier does a good job. I see no reasons to not use prettier. And most developers have long seen the benefits of using formatters.

Yes, some stylistic rules can still be helpful - order of properties (we have a plugin for this), force using newlines in some places (we can reduce them to a minimum options). I think we can put together a list of style rules here and discuss them.

My opinion has always been: want your preferred formatting - write your rule/plugin.

I don’t think we should bear the burden of maintaining due to some developers who want to have an extra space. I don’t want to show disrespect for someone’s preferences.

I think it’s time to say that stylistics rules are outdated. They were all created when we didn’t have good formatters. Enough time has passed since that time and a lot has changed.

My proposal:

  • Collect stylistics rules here and discussion them, maybe divide them on two sides - can be solved formatter and can’t be not solved formatter.
  • Create/update documentation about rules police about stylistics rules.
  • Freeze stylistics rules.
  • Close all issues related to stylistics rules.

@stylelint/contributors

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:15
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

6reactions
jeddy3commented, Jan 11, 2022

@alexander-akait Thanks for writing up the proposal and for starting the discussion.

@nosilleg Thanks for doing the legwork and cataloguing the rules.

Thank you everyone else for chiming in. The consensus is to freeze the stylistic rules.

I agree too. It’ll also help us communicate how a pretty printer like Prettier and a linter like Stylelint are complementary tools that can be used together, and address a misconception in the community that it’s either/or. We can better emphasize the error checking and limiting rules — the latter of which are unique to Stylelint and very useful for authoring consistent CSS.

First, we should update our docs and then close any related issues.

Later down the line, we can deprecate the frozen rules and eventually remove them. I’ll open a follow-up issue for the deprecation. It’s at this point, we should remove the rules from our standard config.

At any point in the process, the community is welcome to migrate the rules into an unofficial plugin pack.

3reactions
jeddy3commented, Jan 17, 2022

I take it to mean that the stylistic rules won’t be touched (including bug fixes), will be deprecated and then eventually removed. People can always migrate a rule to a plugin to fix bugs or add options. Better to have a clean slate down the line, than some halfway house (i.e. some stylistic rules, but not for new language features) as we’re a smaller project than ESLint with limited resources.

Shall we document this?

Good idea. I can open a pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Freezing or long delays | Altium Designer | Knowledge Base
This article covers troubleshooting for the cause, when you experience freezing or long delays and Altium Designer hangs.
Read more >
Types of criterial freezing - lingbuzz
Abstract: Movement chains are delimited by criterial posi- tions: when a moved phrase meets a criterion we observe a freezing effect, and the...
Read more >
About Freezes - Caseware
A document toolbar created in the Freeze can have right- or left-click menus, checkbox style formatting options, and buttons to perform a variety...
Read more >
How to Write Temperatures in a Document - Proofed
But we do have a few general rules to help you when writing temperatures. ... In this system, water freezes at 32°F and...
Read more >
A Win for the Oxford Comma: This Lawsuit Shows Why It's So ...
2. Does AP style use the Oxford comma? 3. An Oxford comma example. 4. The Oxford comma debate, and a $10 million comma....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found