-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fixes #894 - added a CSS Linter #1509
Conversation
Very cool idea (also cool config builder!) I don't have super strong feelings about most of this, but here's what I picked:
|
That's a great idea! :) |
@zoepage yeah, don't worry ❤️ |
Regarding the npm scripts:
I'd suggest to change the naming convention here a little bit, so it should be easier to keep the overview.
The CSS styleI'd love to add
Otherwise I second @miketaylr 's suggestion. Thanks @magsout for the idea and work :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I understand the docs it means:
so many rules… we could probably add |
Yes. Thanks for making that clear @karlcow
I agree. |
good idea, much better 👍 |
@zoepage @karlcow @miketaylr I added your suggestions. I proposed to fix all CSS and try to see if everything is ok.. |
Let's go for it @magsout. Also, once that's done we should probably add a "Linting" section to https://github.com/webcompat/webcompat.com/blob/master/docs/pr-coding-guidelines.md (that can be in a follow up bug). |
package.json
Outdated
"lint": "npm run lint:JS && npm run lint:CSS", | ||
"lint:JS": "eslint ./Gruntfile.js ./tests ./grunt-tasks ./webcompat/static/js/lib && grunt travis-lint", | ||
"lint:CSS": "stylelint ./webcompat/static/css/development/**/*.css", | ||
"fix": "npm run fix:JS && npm run fix:CSS", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
09d1b09
to
2f6f2ba
Compare
ok, ouch, done.. |
package.json
Outdated
"fix": "eslint --fix ./Gruntfile.js ./tests ./grunt-tasks ./webcompat/static/js/lib", | ||
"lint": "npm run lint:JS && npm run lint:CSS", | ||
"lint:JS": "eslint ./Gruntfile.js ./tests ./grunt-tasks ./webcompat/static/js/lib && grunt travis-lint", | ||
"lint:CSS": "stylelint ./webcompat/static/css/development/**/*.css", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
package.json
Outdated
"lint:CSS": "stylelint ./webcompat/static/css/development/**/*.css", | ||
"fix": "npm run lint:fix:JS && npm run lint:fix:CSS", | ||
"lint:fix:JS": "eslint --fix ./Gruntfile.js ./tests ./grunt-tasks ./webcompat/static/js/lib", | ||
"lint:fix:CSS": "stylelint ./webcompat/static/css/development/**/*.css --fix", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
- CSS's Linter is stylelint - package.json's script is modified to take notice of stylelint
4 commits:
|
@magsout SWEET! <3 Is there a reason for the linter not to check the prism.css in vendor? :) |
@zoepage I think it's not our script, so we don't have to lint it, IMHO. |
Tests fail, but not because of any changes made. So, I'll merge :) Good job @magsout :) |
A start for adding a CSS linter.
I don"t lint our css file yet. Because I think we need to talk before @zoepage @miketaylr @karlcow about thoses rules.
I suggest to go to https://maximgatilin.github.io/stylelint-config/ and you tried to create your own configuration. It takes around 5 minutes (about 42 rules) to see if at first we are agree or not.
After we can discuss to enhance this rules and fix all error.