Skip to content

Commit 8f9bc77

Browse files
sendilkumarnjelbourn
authored andcommitted
chore: add stylelint checks to CI (#532)
1 parent 632e90c commit 8f9bc77

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
"url": "https://github.com/angular/material2.git"
99
},
1010
"scripts": {
11-
"ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js",
11+
"ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js",
1212
"build": "ng build",
1313
"demo-app": "ng serve",
1414
"test": "karma start test/karma.conf.js",
1515
"tslint": "tslint -c tslint.json 'src/**/*.ts'",
16+
"stylelint": "stylelint 'src/**/*.scss' --config .stylelint-config.json --syntax scss",
1617
"typings": "typings install --ambient",
1718
"postinstall": "npm run typings",
1819
"e2e": "protractor",
@@ -64,6 +65,7 @@
6465
"sass": "^0.5.0",
6566
"strip-ansi": "^3.0.0",
6667
"symlink-or-copy": "^1.0.1",
68+
"stylelint": "^6.5.1",
6769
"ts-node": "^0.7.3",
6870
"tslint": "^3.5.0",
6971
"typescript": "^1.9.0-dev",

scripts/ci/build-and-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ npm run inline-resources
1616

1717
wait_for_tunnel
1818
if is_lint; then
19-
npm run tslint
19+
npm run tslint
2020
npm run ci:forbidden-identifiers
21+
npm run stylelint
2122
elif is_e2e; then
2223
MD_APP=e2e ng serve &
2324
sleep 20

stylelint-config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"selector-no-id": true
4+
}
5+
}

0 commit comments

Comments
 (0)