diff --git a/package.json b/package.json index a2a84caf0b4..e29596f9d92 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,12 @@ "url": "https://github.com/angular/material2.git" }, "scripts": { - "ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js", + "ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js", "build": "ng build", "demo-app": "ng serve", "test": "karma start test/karma.conf.js", "tslint": "tslint -c tslint.json 'src/**/*.ts'", + "stylelint": "stylelint 'src/**/*.scss' --config .stylelint-config.json --syntax scss", "typings": "typings install --ambient", "postinstall": "npm run typings", "e2e": "protractor", @@ -64,6 +65,7 @@ "sass": "^0.5.0", "strip-ansi": "^3.0.0", "symlink-or-copy": "^1.0.1", + "stylelint": "^6.5.1", "ts-node": "^0.7.3", "tslint": "^3.5.0", "typescript": "^1.9.0-dev", diff --git a/scripts/ci/build-and-test.sh b/scripts/ci/build-and-test.sh index 798bd91119f..a39be3384f6 100755 --- a/scripts/ci/build-and-test.sh +++ b/scripts/ci/build-and-test.sh @@ -16,8 +16,9 @@ npm run inline-resources wait_for_tunnel if is_lint; then - npm run tslint + npm run tslint npm run ci:forbidden-identifiers + npm run stylelint elif is_e2e; then MD_APP=e2e ng serve & sleep 20 diff --git a/stylelint-config.json b/stylelint-config.json new file mode 100644 index 00000000000..34377bcf1fc --- /dev/null +++ b/stylelint-config.json @@ -0,0 +1,5 @@ +{ + "rules": { + "selector-no-id": true + } +} \ No newline at end of file