Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

.csslintrc support #49

Closed
jiayihu opened this issue Sep 29, 2015 · 20 comments
Closed

.csslintrc support #49

jiayihu opened this issue Sep 29, 2015 · 20 comments
Assignees
Labels

Comments

@jiayihu
Copy link

jiayihu commented Sep 29, 2015

I'm trying to disable some rules, but the .csslintrc isn't read. I've created it at the base level of the project folder, the same where I put .jshintrc which works perfectly. Does the package support .csslintrc?

@smlombardi
Copy link

+1 I can't configure the rules at all

@awebdeveloper
Copy link

+1

@Arcanemagus
Copy link
Member

It should support it, since we are simply calling csslint and letting it do all the actual work, but this may be an issue with the environment it is being run in not matching the current directory of the code. This might be as simple as specifying an environment to the helpers module when running csslint, but I won't have time to test this for a bit.

@Arcanemagus
Copy link
Member

Hence the "as simple as specifying an environment" 😛

I don't have time to test this right at the moment though.

@Arcanemagus
Copy link
Member

Finally had some time to implement and test this.

As a note: On my Windows installation with csslint v0.10.0 I was not able to use the JSON formatted .csslintrc file, only the ones formatted like this worked:

--ignore=box-model,ids

So keeping that in mind, let me know if you have any further issues 😄

@smlombardi
Copy link

This does not work either. Atom 1.0.19, OS 10.1.1 linter css 1.1.0

Following the above sugggestion I tried creating a . csslintrc file in my project root AND in my home directory like this:

--ignore=ids,font-sizes,unique-headings

These errors still are displayed.

@Arcanemagus
Copy link
Member

csslint isn't that smart, the.csslintrc file needs to be in the same directory as the .css file.


csslint development has been stalled for a very long time now, although there is some indication somebody might be doing something about that (CSSLint/csslint#616) as of right now things still don't look too hopeful. We are even using a fork of it here to get it usable in the first place...

@svatem1
Copy link

svatem1 commented May 2, 2016

@Arcanemagus how exactly does this work? I have .csslintrc in dir in which my css is, the contents of .csslintrc are literally (as your post above seems the be the only source of this info) "--ignore=ids,font-sizes,unique-headings", but it doesn't seem to work, can you help? thx

@Arcanemagus
Copy link
Member

The only documentation that I know of is this section of the CSSLint wiki.

Does csslint itself respect the file?

And I would highly recommend you switch to a CSS linter that actually works properly like stylelint. CSSLint was completely dead for almost a year, it's shown a few signs of life lately but the main repo is still unusable, and the entire design of the linter is just plain problematic...

@svatem1
Copy link

svatem1 commented May 2, 2016

@Arcanemagus csslint does respect it, is it relevant when you distribute your own fork (that's what I understood from other threads) that's bundled with linter-csslint?

stylelint IS NOT usable, because of AtomLinter/linter-stylelint#176 which renders it completely unusable; I do not plan on using any linter outside of editor, that's like .. you know.. going backwards in time (and even then things like Turbo Pascal were more usable); I'm basicaly looking for something that'll bring me "you forgot semicolon here" functionality

@Arcanemagus
Copy link
Member

Any error like that is an error in the data the linter is returning, if you have a file+configuration for stylelint that causes that to show up please report it, since that is a bug that needs to be fixed!

As this plugin is simply executing (its version of) csslint in the directory of the file, the bug in not picking up the configuration must be within it. If you want to fix this I'd be more than happy to give you access to the fork to update it, but as it stands both that and this project have no active maintainer...

@svatem1
Copy link

svatem1 commented May 2, 2016

@Arcanemagus that error has already been reported (I've read about the issue, it seems like they're clueless, since there are more rules that trigger it and they've already closed some issues regarding it - for me that's sign they don't care); not to mention there's some problem on their side preventing me from commenting on that issue.. (= i have zero hopes or interest in dealing with it)
i don't want to fix it, i just wanted some feedback from somebody who suppossedly succeeded in running it fine, i'll just use something else, if i wanted to programm my own editor, i'd use emacs
thx

@Arcanemagus
Copy link
Member

@svatem1 That particular issue you linked is fixed in the source, and as soon as they release an update including it then linter-stylelint will be updated to include it.

Every one of the "Column start (x) greater than line length (y)" issues is a unique case as there are a myriad of different possible causes. I don't know of anything that would be preventing you from commenting, unless you were trying on one of the locked ones since I will occasionally lock those threads if people keep trying to bring up new (different!) issues on them.

As for this particular linter, I'm sorry it's not working ideally for you, but as there is nobody interested in working on it right now that won't be changing any time soon 😕.

@svatem1
Copy link

svatem1 commented May 2, 2016

@Arcanemagus i can't know that; i'm getting this error on something that looks like newline problem from AtomLinter/linter-stylelint#176 as well as case problem from closed AtomLinter/linter-stylelint#166 . Neither of those issues are mentioning patch anywhere..

I can comment now (I guess, preview works), for some reason comment preview as well as ability to comment didn't work yesterday & day before. I did not try to comment on locked thread, why would I comment on locked thread, when there's exactly the same problem as I'm experiencing opened and I'm even linking it here..

No prob, it's a matter of finding the acceptable local maximum for my needs quickly rather than trying to fix the world, just imagine I'd try to fix every bug I find in products I use, now that'd be completely ridiculous, wouldn't it. I try to help where ppl are interested in it (= do not close thread about bugs that are in effect unless those bugs are solved)

@Arcanemagus
Copy link
Member

AtomLinter/linter-stylelint#176 is fixed (commented there linking to it), AtomLinter/linter-stylelint#166 is still pending.

I generally close issues that aren't related to the project they were posted on, since they have nothing to do with it. The wrong column error in AtomLinter/linter-stylelint#166 you are so focused on was actually fixed a while back, the recent comments there are about a completely separate issue.

You would be surprised how many people complaining they can't comment on something are trying to comment on a locked thread...

@svatem1
Copy link

svatem1 commented May 2, 2016

closed issues - without some concluding message, just try to imagine how usefull it is for somebody who's trying to find out what the current state of the things is..

color-hex-case is problematic fyi, if you care

@Arcanemagus
Copy link
Member

It doesn't look like there is an open issue for it, so I'm sure the stylelint folks would love a bug report so they can get that fixed for everyone using that tool. 😉

@svatem1
Copy link

svatem1 commented May 2, 2016

I'm sorry, I've just looked into 1148, 1100 and neither seem like good candidate for "this same error but with color-hex-case", linter-stylelint's erromsg has nothing to do with stylelint unfortunately; i'm not going to put more time into it, if you have some insight, please do so, if you care

@Arcanemagus
Copy link
Member

If you can upload a file and a stylelint configuration that show the error I can investigate the rest, as I said before.

@svatem1
Copy link

svatem1 commented May 3, 2016

no explicit configuration, just checked "use standard" (idk what it does behind the scenes, it definitely does not npm install that package) in plugin's config ui
can't reproduce it (= isolated hex color case) now, one thing i noticed though was it triggered the error even if the failing rule was disabled (via stylelint-disable in 1st comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants