diff --git a/loleaflet/.gitignore b/loleaflet/.gitignore index 5ee2678209..33dac7e7a3 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 0000000000..83b2927a41 --- /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 44c4886fa1..20dbcb80d5 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 d081f4eb9c..0c6eb695a7 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",