-
Notifications
You must be signed in to change notification settings - Fork 483
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
CSSLint + Stylelint #668
Comments
Hey there. All this seems nice, but personally I have very limited time at this point. If there are developers willing to do this not just for a week, I'm totally Unfortunately we lack of manpower. I tried getting out a stable release but On Jul 22, 2016 17:10, "Andrey Sitnik" notifications@github.com wrote:
|
@XhmikosR sure, maintaining is hard. But this merging could dramatically help you with lack of manpower ;). I will ask my followers to help. I think the first task will be to compare CSSLint and Stylelint rules. |
I'm happy to help! So use me ☝🏻️ |
I'll be happy to help as well. Keep me informed! |
I am ready to help, too. |
Happy to help! |
@mjovel @alanev @Xaviju @maraisr Awesome! Also I have Kirbaba developer from Russia, who want to have. First step is to check CSSLint rules — what we can already implement in Stylelint. Here is CSSLint rules: https://github.com/CSSLint/csslint/wiki/Rules. I count 31 rules. We have 5 developers. Let’s everyone take 6 rules:
I need you to check every rule and mark it with:
|
It's awesome that all of you stepped forward to help with this! One of the things I imagine will need to happen during the course of development is the creation of a |
@davidtheclark yeah mate - I think its so amazing too!! My two cents are, I think that @ai wanted to iron out the discrepancy between having 2 toolsets that do roughly the exact same thing, and merge them into 1 toolchain, like JSCS and ESlint did. |
@maraisr Yep, sounds right! I'm not suggesting that the merge wouldn't involve enhancements to stylelint, if it sounded like that. Just suggesting that I think to full compatibility with CSSLint's rule set will involve a combination of enhancements to existing rules, new rules, and a |
@davidtheclark sure, we could put extra rules in different place if they are should not be stylelint core. Also where we can find good third-party rules list (for CSSLint rules checking)? |
I don't think anyone's compiled a comprehensive list of third party rules. @jeddy3 might know more than me here. But I've relied just on npm searches to see what's out there --- kind of weak. |
@davidtheclark yeah - will be interesting! In my mind I see a "polymorphic" style approach, where by you can load both your long standing csslint, and or stylelint config file, with a general move toward a standard config. |
Agreed. Thanks everyone!
Agreed. To expand on what @davidtheclark said, rules are only included in core if they meet these criteria. This is to ensure development of the linter remains sustainable.
Plugin authors are asked to include the Bare in mind that around three quarters of these plugins are deprecated (or have pending deprecate issues) as they can now be handled by core rules e.g. the deprecated plugin
Would a simple migration guide from CSSLint to stylelint (in the same manner as this one for scss-lint) not be the simplest option here? If someone feels adventurous they could create a standalone tool (and/or website) that converts a CSSLint config into a stylelint one. Either way, I agree with @ai's first step. Once we have a better idea of what CSSLint rules are already achievable using stylelint, we'll be in a better position to decide what approach is best. @maraisr @Xaviju @alanev @mjovel FYI, you'll find the complete list of stylelint's rules here. If you're not already familiar with stylelint you might find this guide about rules useful, as it explains the naming convention and how rules are designed to work together. There is also this part of the Developer Guide that details the option conventions we use. Good luck and please don't hesitate to holler if you've any questions about the workings and conventions of stylelint :) |
I'm a bit late but I want to help as well :) guess I will join later |
1. The same Stylelint rules 2. Similar rules in Stylelint, but we need to add some features or options: there is no rule for combination of inline-block displaying with float. "duplicate-properties" is looks like "declaration-block-no-duplicate-properties" but there is nothing about checking properties which containing the same value. .mybox {
border: 1px solid black;
border: 1px solid black;
} 3. There is no same rules in Stylelint "known-properties" in the CSSLint is checking a value and ignoring all vendor-prefixes. Stylelint "property-no-unknown" is checking only property and isn't ignoring a prefixes. |
@jeddy3 awesome migration guide. But it doesn’t really work.
As result we will have few % of users in the end of this funnel. Of course for users will be much easy to just change |
I'm more 👎 on this, but since I've been pretty dormant I'll go with what the other maintainers go with.
I will probably use Stylelint in new projects projects where it makes sense, just like I've transitioned some to ESLint where it makes sense. You folks are doing awesome stuff, and I've enjoyed the Autoprefixer for along time. |
|
@delorge feel free to take someone rules task if they will not get review in this evening :) |
@nschonni @ai I don't know what "functional linting" refers to, and don't see a definition on a quick search. But I agree that there's a difference in approach. I wouldn't say that CSSLint is more like JSHint than stylelint, in trying to catch real code errors (both do that); and I also wouldn't say that stylelint is restricted to "style-only" rules (there are plenty of non-style rules). A distinction that does exist, I think --- and maybe this is what you're referring to --- is that CSSLint includes rules like "too many floats", which are more like provisional suggestions that you may override in code review rather than auto-enforceable rules. (Those are in fact the kind of rules that I think would make for better stylelint plugins than core rules.) The reason for the merge would not be to stop enforcement of those CSSLint-specific rules (plugin collection would work), but to share infrastructure and maintenance, and possibly even extend those CSSLint-specific rules to a wider audience (e.g. SCSS users). (Why are people worried about filesize for npm modules? Is it just download time when running |
2. Similar rules in Stylelint, but we need to add some features or options: Stylelint rule "no-browser-hacks" can be extended to include the CSSLint rules "start-property-hack" and "underscore-property-hack" 3.There is no same rules in Stylelint
|
@ai Thanks for organizing! What do you envision as the next step? One possibility would be to open issues for all the CSSLint rules the do not have already have direct substitutes so we can discuss how to handle each one individually. |
I'm working on my task, it should be ready today, sorry 👍 |
Existing Stylelint rules CSSLint unique rules CSSLint rules I'm not sure about There are no such rules in stylelint, but selector-no-type dissalows h3 {
font-weight: normal;
} and has an option to allow descendant type selectors which may cause conflict with this dissalowed declaration: .box h3 {
font-weight: bold;
} I guess we need separate rules for these ones, but I don't know how to handle possible conflicts. @ai @davidtheclark @jeddy3 any thoughts? |
Disallow star hack
underscore-property-hack
Same as above bulletproof-font-face
font-faces
import
regex-selectors
|
sorry. yesterday was a travel day. Thanks for picking my set up @delorge |
I'm mostly just helping out with basic stuff/triage/quick-fixes. I leave the decisions up to the others. |
@delorge thank you for the overview! We're getting close guys! |
|
@delorge also i don't understand what need reworked/updated in rules:
|
I suggest as a next step to open individual issues in stylelint for each rule or option that you think should be added. We could also open issues for individual plugins, either there or here, now or later. That way we can discuss each case in its own individual issue. I think that will be more effective than trying to address them all here in this one thread. |
@davidtheclark maybe open one issue |
@davidtheclark i tend to agree, the issues will allow us to in effect keep track of progress! |
1. Need to write:
2. Need to extend or rewrite:
|
@evilebottnawi I didn't examine most of the rules, I just put everything in order :)
|
@evilebottnawi agreed with box-sizing, moving this rule to update category. |
@delorge @evilebottnawi I don't think they need to be rewritten. Both |
@Xaviju alright, moving this to deprecated category |
Move to stylelint/stylelint#1739, let's go |
Sgtm. I suggest creating the plugin issues in this issue tracker and the rule issues (that meet the criteria) in the stylelint issue tracker, so that the separation of responsibilities is maintained. |
Yup, definitely. The point I was making was that JSCS and ESLint wasn't 2 functional linting projects merging.
Is there a standalone web version? The web version I saw on the site looks like it requires a backend.
No, I couldn't find a good way of pulling down Rhino in a build matrix, but it has been awhile since I looked. We had problems because of bugs in the last official release (when I looked), but were fixed in the unreleased version.
|
Sure, JSCS and ESLint had more differences. But I think that idea difference is main reason against merging. If some project has some idea, they should merge to solve this idea in the best way.
Just use browserify or webpack to build client side. Most of PostCSS plugins are client side ready.
How did you test it? We could implement this testing in Stylelint too. But, honestly there was no WSH/Rhino issue reports in entire PostCSS ecosystem (it is much bigger) — seems like most of users was migrated to node.js. |
@delorge Thanks for the summary!
Over at stylelint we've created new issues for the rules and options that we think should be added to core. That leaves the following plugins up for discussion outside of the stylelint organisation: Possible ErrorsCompatibility
PerformanceMaintainability & DuplicationAccessibilityOOCSSWhoever wants to lead the In terms of inspiration of what a plugin pack might look like, I suggest checking out From this point forward, I suggest this issue should focus on discussing the merits of different merge/migration paths e.g. @ai's suggestion of: npm install stylelint-csslint stylelint; stylelint-csslint convert ./ If a conversion CLI tool bundled within One advantage I can think of the conversion tool is that current CSSLint can remain available for anyone wishing to use rules deemed outdated in |
@seth2810 can you PR in our repo? |
@evilebottnawi I don't understand what you mean. Of course I can make PR in your repo, but I think it is about creating a separate repo for missing rules. It would be great if the solution would work in both directions:
|
I think if we will merge CSSLint and Stylelint everyone will win — users will get more features, and we will have more free time. We already have great examples of ESLint + JSCS, Babel + esnext, Rails + Merb.
@XhmikosR @frvge @davidtheclark @jeddy3 what do you think?
Merging Plan Example
Benefits for CSSLint Developers
eslint --fix
does in JS. Stylelint already could do it for some rules with Stylefmt.Benefits for CSSLint Users
The text was updated successfully, but these errors were encountered: