Skip to content

Commit

Permalink
Add scss linter in web console (apache#7365)
Browse files Browse the repository at this point in the history
* Add SCSS linter

* Fixed SCSS styles
  • Loading branch information
shuqi7 authored and clintropolis committed Mar 29, 2019
1 parent ad7862c commit be1d7f8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 13 deletions.
17 changes: 17 additions & 0 deletions web-console/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": [
"stylelint-scss"
],
"defaultSeverity": "error",
"extends": "stylelint-config-recommended-scss",
"rules": {
"indentation": 2,
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"scss/at-import-no-partial-leading-underscore": true,
"scss/dollar-variable-colon-space-after": "always",
"scss/dollar-variable-colon-space-before": "never",
"no-descending-specificity": null,
"no-missing-end-of-source-newline": true
}
}
6 changes: 5 additions & 1 deletion web-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"test": "jest --silent 2>&1",
"generate-licenses-file": "license-checker --production --json --out licenses.json",
"check-licenses": "license-checker --production --onlyAllow 'Apache-1.1;Apache-2.0;BSD-2-Clause;BSD-3-Clause;MIT;CC0-1.0' --summary",
"start": "webpack-dev-server --hot --open"
"start": "webpack-dev-server --hot --open",
"stylelint": "stylelint 'src/**/*.scss'"
},
"dependencies": {
"@blueprintjs/core": "1.0.1",
Expand Down Expand Up @@ -66,6 +67,9 @@
"postcss-preset-env": "^6.5.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"stylelint": "^9.10.1",
"stylelint-config-recommended-scss": "^3.2.0",
"stylelint-scss": "^3.5.4",
"stylus": "^0.54.5",
"ts-jest": "^23.10.5",
"ts-loader": "^5.3.3",
Expand Down
2 changes: 1 addition & 1 deletion web-console/src/components/auto-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
.ace_scroller {
background-color: #212c36;
}
}
}
14 changes: 6 additions & 8 deletions web-console/src/components/rule-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@
* limitations under the License.
*/

.rule-editor {
.right {
.rule-editor {
.right {
text-align: right;
}
}

margin-bottom: 20px;

.title {


.title {
display: flex;

.spacer {
flex: 1;
}
}
}
}
}
2 changes: 1 addition & 1 deletion web-console/src/components/sql-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
.function-doc-name {
font-size: 18px;
}
}
}
2 changes: 1 addition & 1 deletion web-console/src/dialogs/lookup-edit-dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
.ace_gutter-layer {
background-color: #27313c;
}
}
}
2 changes: 1 addition & 1 deletion web-console/src/views/lookups-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
text-align: center;
margin-top: 35vh;
}
}
}

0 comments on commit be1d7f8

Please sign in to comment.