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

.csslintrc not used #158

Closed
tomsotte opened this issue Dec 13, 2016 · 10 comments
Closed

.csslintrc not used #158

tomsotte opened this issue Dec 13, 2016 · 10 comments
Labels

Comments

@tomsotte
Copy link

tomsotte commented Dec 13, 2016

EDIT 2: Seems like .csslintrc changed format from JSON to "flags", see brendanmckeown's comment

EDIT: I've seen in the issues here that's it's not implemented.

I've placed in the root of my project a file named ".csslintrc" and tried some rules but none of those worked.
I've tried to restart the plugin and even Atom but nothing worked, the rules I've set are ignored.

I believe the format is in JSON.
Example of what a tried:

{
	"adjoining-classes": true,
	"box-model": false,
	"box-sizing": false,
	"bulletproof-font-face": false,
	"compatible-vendor-prefixes": false,
	"display-property-grouping": false,
	"duplicate-background-images": false,
	"duplicate-properties": false,
	"empty-rules": false,
	"fallback-colors": false,
	"floats": false,
	"font-faces": false,
	"font-sizes": false,
	"gradients": false,
	"ids": false,
	"import": false,
	"important": false,
	"known-properties": false,
	"non-link-hover": false,
	"outline-none": false,
	"overqualified-elements": true,
	"qualified-headings": false,
	"regex-selectors": false,
	"shorthand": false,
	"star-property-hack": false,
	"text-indent": false,
	"underscore-property-hack": false,
	"vendor-prefix": false,
	"unique-headings": false,
	"universal-selector": false,
	"unqualified-attributes": false,
	"zero-units": false
}
@Arcanemagus
Copy link
Member

Actually, it should be working, #140 is about overriding the automatic detection and telling it explicitly where the config is located.

@tomsotte
Copy link
Author

tomsotte commented Dec 13, 2016

Interesting.
What could I try to make it work?
I really don't like stylelint for the fact that it has way to much configuration options.

More info:
.csslintrc saved in UTF-8 with CRLF;
Atom 1.11.1 on Windows 7 64 bit

@Arcanemagus
Copy link
Member

Does csslint foo.js work when ran from the project root?

@Arcanemagus Arcanemagus reopened this Dec 13, 2016
@tomsotte
Copy link
Author

tomsotte commented Dec 20, 2016

I'm sorry for the late response. Here's what i get

$ csslint style.clean.css
adjoining-classes is not a valid option. Exiting...

The .csslintrc is the above.
I've just checked and it is an existing rule apparently: https://github.com/CSSLint/csslint/search?utf8=%E2%9C%93&q=adjoining-classes&type=Code

@Arcanemagus
Copy link
Member

That output means that it is using the .csslintrc, however your .csslintrc has an invalid option that csslint doesn't understand.

@brendanmckeown
Copy link

I am also getting the error "adjoining-classes is not a valid option. Exiting..." when trying to run csslint on any file.

@Arcanemagus - adjoining-classes is definitely one of the valid rules shown in the output of csslint --list-rules.

@brendanmckeown
Copy link

The issue is that the supported format of the .csslintrc has changed from JSON to:

--errors=adjoining-classes
--warnings=import,text-indent
--ignore=box-model

@Arcanemagus
Copy link
Member

@brendanmckeown As far as I know CSSLint has only ever supported that format, that's what has been documented at least.

@brandly
Copy link

brandly commented Mar 22, 2017

@Arcanemagus that link you provided has an example .csslintrc that is JSON...

@Arcanemagus
Copy link
Member

Arcanemagus commented Mar 22, 2017

@brandly Then go tell csslint they have terrible documentation? 😛

At this stage csslint is completely dead as far as I can see, it has had virtually no work done on it lately and has had multiple year+ breaks in what little has been done.

I highly recommend anyone still using it for some reason to look into moving to stylelint.

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

4 participants