This is an automated email from the ASF dual-hosted git repository.
cwylie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new be1d7f8 Add scss linter in web console (#7365)
be1d7f8 is described below
commit be1d7f885bf8ae9cc85d6fbd40a02f8a0a678816
Author: Qi Shu <[email protected]>
AuthorDate: Thu Mar 28 17:32:01 2019 -0700
Add scss linter in web console (#7365)
* Add SCSS linter
* Fixed SCSS styles
---
web-console/.stylelintrc.json | 17 +++++++++++++++++
web-console/package.json | 6 +++++-
web-console/src/components/auto-form.scss | 2 +-
web-console/src/components/rule-editor.scss | 14 ++++++--------
web-console/src/components/sql-control.scss | 2 +-
web-console/src/dialogs/lookup-edit-dialog.scss | 2 +-
web-console/src/views/lookups-view.scss | 2 +-
7 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/web-console/.stylelintrc.json b/web-console/.stylelintrc.json
new file mode 100644
index 0000000..eb735c5
--- /dev/null
+++ b/web-console/.stylelintrc.json
@@ -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
+ }
+}
diff --git a/web-console/package.json b/web-console/package.json
index fcde0ad..7890282 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -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",
@@ -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",
diff --git a/web-console/src/components/auto-form.scss
b/web-console/src/components/auto-form.scss
index c27406c..4b772c4 100644
--- a/web-console/src/components/auto-form.scss
+++ b/web-console/src/components/auto-form.scss
@@ -20,4 +20,4 @@
.ace_scroller {
background-color: #212c36;
}
-}
\ No newline at end of file
+}
diff --git a/web-console/src/components/rule-editor.scss
b/web-console/src/components/rule-editor.scss
index 6cbc317..dcdad63 100644
--- a/web-console/src/components/rule-editor.scss
+++ b/web-console/src/components/rule-editor.scss
@@ -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;
}
- }
- }
+ }
+}
diff --git a/web-console/src/components/sql-control.scss
b/web-console/src/components/sql-control.scss
index 9e55c5a..f8ae795 100644
--- a/web-console/src/components/sql-control.scss
+++ b/web-console/src/components/sql-control.scss
@@ -58,4 +58,4 @@
.function-doc-name {
font-size: 18px;
}
-}
\ No newline at end of file
+}
diff --git a/web-console/src/dialogs/lookup-edit-dialog.scss
b/web-console/src/dialogs/lookup-edit-dialog.scss
index 2fe6c44..3a26abc 100644
--- a/web-console/src/dialogs/lookup-edit-dialog.scss
+++ b/web-console/src/dialogs/lookup-edit-dialog.scss
@@ -42,4 +42,4 @@
.ace_gutter-layer {
background-color: #27313c;
}
-}
\ No newline at end of file
+}
diff --git a/web-console/src/views/lookups-view.scss
b/web-console/src/views/lookups-view.scss
index 4fc35dc..eb97cf8 100644
--- a/web-console/src/views/lookups-view.scss
+++ b/web-console/src/views/lookups-view.scss
@@ -31,4 +31,4 @@
text-align: center;
margin-top: 35vh;
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]