loleaflet/.gitignore | 1 - loleaflet/.stylelintrc.json | 13 +++++++++++++ loleaflet/Makefile.am | 2 ++ loleaflet/package.json | 4 +++- 4 files changed, 18 insertions(+), 2 deletions(-)
New commits: commit d7353acf969ba6e35ef3edc5d4b63a06e81bcf7f Author: Henry Castro <[email protected]> AuthorDate: Mon Sep 7 15:22:38 2020 -0400 Commit: Pedro Silva <[email protected]> CommitDate: Tue Sep 8 17:33:12 2020 +0200 loleaflet: introduce "stylelint" a modern linter for CSS Change-Id: I8a7427eeb3b838baac8a6669d5313dc0d53d9ddd Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102199 Tested-by: Pedro Silva <[email protected]> Reviewed-by: Pedro Silva <[email protected]> diff --git a/loleaflet/.gitignore b/loleaflet/.gitignore index 5ee267820..33dac7e7a 100644 --- a/loleaflet/.gitignore +++ b/loleaflet/.gitignore @@ -1,6 +1,5 @@ node_modules node_cache -.* tmp/**/* *.iml *.sublime-* diff --git a/loleaflet/.stylelintrc.json b/loleaflet/.stylelintrc.json new file mode 100644 index 000000000..83b2927a4 --- /dev/null +++ b/loleaflet/.stylelintrc.json @@ -0,0 +1,13 @@ +{ + "rules": { + "indentation": "tab", + "string-quotes": "single", + "no-duplicate-selectors": true, + "selector-combinator-space-after": "always", + "selector-attribute-quotes": "always", + "selector-attribute-brackets-space-inside": "never", + "function-url-quotes": ["always", { + "except": ["empty"] + }] + } +} diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 44c4886fa..20dbcb80d 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -447,6 +447,8 @@ $(INTERMEDIATE_DIR)/loleaflet-src.js: $(call prereq_loleaflet) $(DIST_FOLDER)/bundle.css: $(call prereq_css) @mkdir -p $(dir $@) + @echo "Checking for CSS errors..." + @$(NODE) node_modules/stylelint/bin/stylelint.js --config $(srcdir)/.stylelintrc.json $(srcdir)/css/*.css $(call bundle_css) $(DIST_FOLDER)/bundle.js: $(INTERMEDIATE_DIR)/loleaflet-src.js $(call prereq_all) diff --git a/loleaflet/package.json b/loleaflet/package.json index d081f4eb9..0c6eb695a 100644 --- a/loleaflet/package.json +++ b/loleaflet/package.json @@ -23,7 +23,9 @@ "uglifycss": "0.0.29", "uglifyify": "5.0.2", "vex-js": "4.1.0", - "typescript": "3.9.5" + "typescript": "3.9.5", + "stylelint-config-standard": "20.0.0", + "stylelint": "13.7.0" }, "repository": { "type": "git", _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
