Skip to content

Commit

Permalink
Merge pull request #516 from christophercr/feature/fix-style-linting
Browse files Browse the repository at this point in the history
style(stark-all): add missing "lint-css" npm script to lint CSS in all packages (executed via the "lint" npm script)
  • Loading branch information
SuperITMan authored Jul 16, 2018
2 parents 9cbceb7 + 238e1ac commit eccceb6
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 deletions.
21 changes: 12 additions & 9 deletions packages/stark-build/config/stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ module.exports = {
message: "Function names should be in lowercase following the CSS specification."
}
],
"string-quotes": [
"double",
{
message: "Always use double quotes for consistency."
}
],
"length-zero-no-unit": [
true,
{
Expand Down Expand Up @@ -109,8 +103,6 @@ module.exports = {
}
],
"selector-pseudo-element-no-unknown": true,
// FIXME: cannot simply leave this rule commented for now (stylelint-config-prettier v3.2.0) otherwise it is still recognized as conflict
"selector-descendant-combinator-no-non-space": null,
"selector-type-case": [
"lower",
{
Expand All @@ -130,7 +122,12 @@ module.exports = {
message: "Never put spaces inside media feature parentheses to avoid unnecessary whitespace."
}
],
"at-rule-no-unknown": true,
"at-rule-no-unknown": [
true,
{
ignoreAtRules: ["each", "else", "for", "function", "if", "include", "mixin", "return"] /* SCSS-specific @-directives */
}
],
"no-duplicate-at-import-rules": [
true,
{
Expand Down Expand Up @@ -170,6 +167,12 @@ module.exports = {
"message": "Avoid empty lines in functions to improve readability."
}
],
"string-quotes": [
"double",
{
message: "Always use double quotes for consistency."
}
],
"value-list-comma-newline-before": [
"never-multi-line",
{
Expand Down
4 changes: 3 additions & 1 deletion packages/stark-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
"docs:coverage": "npm run docs -- --coverageTest 85 --coverageThresholdFail true",
"docs:serve": "npm run docs -- --watch --serve --port 4321",
"ngc": "node ../../node_modules/@angular/compiler-cli/src/main.js -p ./tsconfig-build.json",
"lint": "node ../../node_modules/tslint/bin/tslint --config ./tslint.json --project ./tsconfig.spec.json --format codeFrame",
"lint": "npm run lint-ts && npm run lint-css",
"lint-ts": "node ../../node_modules/tslint/bin/tslint --config ./tslint.json --project ./tsconfig.spec.json --format codeFrame",
"lint-css": "node ../../node_modules/stylelint/bin/stylelint \"./**/*.?(pc|sc|c|sa)ss\" --formatter \"string\"",
"test": "npm run lint && npm run test-fast",
"test:ci": "npm run lint && npm run test-fast:ci",
"test-fast": "node ./node_modules/@nationalbankbelgium/stark-testing/node_modules/karma/bin/karma start",
Expand Down
1 change: 1 addition & 0 deletions packages/stark-ui/assets/styles/_old-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ $md-warn-100: mat-color(map-get($base-theme, warn-palette), 100); /* rgb(255, 20
$md-warn: mat-color(map-get($base-theme, warn-palette)); /* rgb(255, 87, 34) */
$md-warn-600: mat-color(map-get($base-theme, warn-palette), 600); /* rgb(244, 81, 30) */
$md-warn-700: mat-color(map-get($base-theme, warn-palette), 700); /* rgb(230, 74, 25) */
/* stylelint-disable-next-line value-keyword-case */
$md-warn-a700: mat-color(map-get($base-theme, warn-palette), A700); /* rgb(221, 44, 0) */
$md-warn-alpha-26: rgba(255, 87, 34, 0.26);
$md-warn-alpha-50: rgba(255, 87, 34, 0.5);
Expand Down
6 changes: 3 additions & 3 deletions packages/stark-ui/assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ $backgrounds: (
app-bar: map_get($mat-grey, 100),
background: #f6f9fa,
hover: rgba(black, 0.04),
card: #ffffff,
dialog: #ffffff,
card: #fff,
dialog: #fff,
disabled-button: rgba(black, 0.12),
raised-button: #ffffff,
raised-button: #fff,
focused-button: $dark-focused,
selected-button: map_get($mat-grey, 300),
selected-disabled-button: map_get($mat-grey, 400),
Expand Down
4 changes: 3 additions & 1 deletion packages/stark-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
"docs:coverage": "npm run docs -- --coverageTest 85 --coverageThresholdFail true",
"docs:serve": "npm run docs -- --watch --serve --port 4321",
"ngc": "node ../../node_modules/@angular/compiler-cli/src/main.js -p ./tsconfig-build.json",
"lint": "node ../../node_modules/tslint/bin/tslint --config ./tslint.json --project ./tsconfig.spec.json --format codeFrame",
"lint": "npm run lint-ts && npm run lint-css",
"lint-ts": "node ../../node_modules/tslint/bin/tslint --config ./tslint.json --project ./tsconfig.spec.json --format codeFrame",
"lint-css": "node ../../node_modules/stylelint/bin/stylelint \"./**/*.?(pc|sc|c|sa)ss\" --formatter \"string\"",
"test": "npm run lint && npm run test-fast",
"test:ci": "npm run lint && npm run test-fast:ci",
"test-fast": "node ./node_modules/@nationalbankbelgium/stark-testing/node_modules/karma/bin/karma start",
Expand Down
3 changes: 2 additions & 1 deletion showcase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"github-deploy:prod": "npm run webpack -- --config node_modules/@nationalbankbelgium/stark-build/config/webpack.github-deploy.js --progress --profile --env.githubProd",
"github-deploy": "npm run github-deploy:dev",
"karma": "karma",
"lint": "tslint --config ./tslint.json --project ./tsconfig.json --format codeFrame",
"lint": "npm run lint-ts && npm run lint-css",
"lint-ts": "tslint --config ./tslint.json --project ./tsconfig.json --format codeFrame",
"lint-css": "stylelint \"./src/**/*.?(pc|sc|c|sa)ss\" --formatter \"string\"",
"ngc": "ngc",
"node": "node",
Expand Down
3 changes: 2 additions & 1 deletion starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"github-deploy:prod": "npm run webpack -- --config node_modules/@nationalbankbelgium/stark-build/config/webpack.github-deploy.js --progress --profile --env.githubProd",
"github-deploy": "npm run github-deploy:dev",
"karma": "karma",
"lint": "tslint --config ./tslint.json --project ./tsconfig.json --format codeFrame",
"lint": "npm run lint-ts && npm run lint-css",
"lint-ts": "tslint --config ./tslint.json --project ./tsconfig.json --format codeFrame",
"lint-css": "stylelint \"./src/**/*.?(pc|sc|c|sa)ss\" --formatter \"string\"",
"ngc": "ngc",
"node": "node",
Expand Down

0 comments on commit eccceb6

Please sign in to comment.