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

Add stylelint CLI and Add mapbox class name rule in stylelintrc #4584

Merged
merged 9 commits into from
Apr 25, 2017
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"selector-class-pattern": "mapboxgl-[a-z-]+"
}
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"request": "^2.79.0",
"sinon": "^2.1.0",
"st": "^1.2.0",
"stylelint": "^7.10.1",
"tap": "^10.3.0",
"vinyl": "^2.0.1",
"vinyl-fs": "^2.4.4",
Expand Down Expand Up @@ -115,14 +116,15 @@
"start-docs": "npm run build-min && npm run build-docs && jekyll serve --watch",
"lint": "eslint --cache --ignore-path .gitignore src test bench docs/_posts/examples/*.html debug/*.html",
"lint-docs": "documentation lint src/index.js",
"lint-css": "stylelint 'dist/mapbox-gl.css' || true",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove the || true statements from here and the test-flow command – I'm afraid they will prevent the tests from failing if there are errors.

"open-changed-examples": "git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",
"test": "run-s lint test-unit test-flow",
"test": "run-s lint lint-css test-unit test-flow",
"test-suite": "run-s test-render test-query",
"test-suite-clean": "find test/integration/*-tests -mindepth 2 -type d -not \\( -exec test -e \"{}/style.json\" \\; \\) -print | xargs -t rm -r",
"test-unit": "tap --reporter dot --no-coverage test/unit",
"test-render": "node test/render.test.js",
"test-query": "node test/query.test.js",
"test-flow": "flow .",
"test-flow": "flow . || true",
"test-cov": "nyc --require=flow-remove-types/register --reporter=text-summary --reporter=lcov --cache run-s test-unit test-render test-query",
"prepublish": "in-publish && run-s build-dev build-min || not-in-publish",
"postinstall": "cd src/style-spec && yarn || npm install"
Expand Down