Skip to content
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

Lint CSS files? #85

Closed
pdehaan opened this issue Apr 17, 2018 · 0 comments · Fixed by #87
Closed

Lint CSS files? #85

pdehaan opened this issue Apr 17, 2018 · 0 comments · Fixed by #87

Comments

@pdehaan
Copy link
Collaborator

pdehaan commented Apr 17, 2018

Currently, our CSS files aren't very complex, but it may be worth considering adding something like stylelint to the tool belt.

Possible solution:

// .stylelintrc
{
  "extends": "stylelint-config-standard",
  "ignoreFiles": [
    "public/css/vendor/*.css"
  ]
}
diff --git a/package.json b/package.json
index 9c75c03..0e4ff85 100644
--- a/package.json
+++ b/package.json
@@ -31,6 +31,8 @@
     "npm-run-all": "^4.1.2",
     "nsp": "^3.2.1",
     "nyc": "^11.5.0",
+    "stylelint": "^9.2.0",
+    "stylelint-config-standard": "^18.2.0",
     "tape": "^4.9.0"
   },
   "engines": {
@@ -49,6 +51,7 @@
   },
   "scripts": {
     "lint": "npm-run-all lint:*",
+    "lint:css": "stylelint 'public/css/**/*.css'",
     "lint:js": "eslint .",
     "lint:nsp": "nsp check",
     "pretest": "npm run lint",

That should lint all the CSS files (except the files in the ./public/css/vendor/ directory).

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

Successfully merging a pull request may close this issue.

2 participants