Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Question: What is the recommended linter? #153

Closed
MKruschke opened this issue Oct 26, 2018 · 6 comments
Closed

Question: What is the recommended linter? #153

MKruschke opened this issue Oct 26, 2018 · 6 comments

Comments

@MKruschke
Copy link

MKruschke commented Oct 26, 2018

Hi,
in the last major version (8.0.0) the noValueNotifications option where removed.

Changelog:

Removed: warnings and noValueNotifications options, as this should be the job of a linter tool.

We inject custom props through the importFrom option via webpack postcss-loader, but now we haven't any feedback when a property is missing. Which linter can make sure that all used props are available (especially when they are injected)?

Best Mirko

@cheshrkat
Copy link

Given the author of https://github.com/csstools/stylelint-value-no-unknown-custom-properties I am going to guess stylelint is the recommended option? ;)

FWIW - philosophically I see this more as a compiler error than a linter problem. That is, I really wanted to set this plugin to error out the same way SCSS errors on undefined variables, because it's so fundamental to what the plugin does.

@jonathantneal
Copy link
Member

@MKruschke, yes, I recommend using csstools/stylelint-value-no-unknown-custom-properties.

@cheshrkat, I do not think they should error in the plugin, as you may intentionally have Custom Properties managed by another file or JavaScript. Off hand, I can think of an example where developers assign window.innerWidth and window.innerHeight to Custom Properties because they are more reliable than viewport units.

@cheshrkat
Copy link

shrug that's why these things should be options :) But thanks for giving your thoughts on it, it's great to understand where you're going with things (and thanks for the plugins! they've directly enabled us to go all-in on CSS vars :)).

@danny-andrews-snap
Copy link

Properties managed by another file or JavaScript

If you are able to manage custom properties via JavaScript, then you are developing for browsers which support the custom property spec, therefore you have no reason to use this plugin, no?

@danny-andrews-snap
Copy link

@jonathantneal Hey now, I made this comment first and then decided it would be better as its own issue. Not the other way around.

@jonathantneal
Copy link
Member

Thank you for letting me know, and thank you for taking the time to explain. I misunderstood the timing between GitHub and Email. That’s on me. I am going to lock this conversation, but just to keep things focused. As a person, I’ll also try to be less anxious.

@postcss postcss locked as resolved and limited conversation to collaborators Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants