A “mighty, modern linter” allowing you to write better css
, less
and sass
. Letting you run Stylelint from inside a container. This implements the stylelint-config-standard, however, you could extent to alter that if required.
This is a Dockerised Solution for running Stylelint.
Dockerfile
linksThe numbering is based upon the node version.
latest
, alpine
, 10-alpine
Dockerfilestretch
, 10-stretch
Dockerfile8-alpine
Dockerfile8-stretch
Dockerfile6-alpine
Dockerfile6-stretch
Dockerfile$ docker pull willhallonline/stylelint
$ docker pull willhallonline/stylelint:alpine
$ docker pull willhallonline/styeling:8-alpine
$ docker run -it --rm -v $(pwd):/app willhallonline/stylelint [your css file]
bad.css
$ docker run --rm -it -v $(pwd):/app willhallonline/stylelint:10-alpine bad.css
bad.css
1:16 ✖ Expected single space before "}" of a single-line block block-closing-brace-space-before
1:16 ✖ Expected a trailing semicolon declaration-block-trailing-semicolon
2:1 ✖ Expected empty line before rule rule-empty-line-before
3:1 ✖ Expected indentation of 2 spaces indentation
3:17 ✖ Expected single space after ":" with a single-line declaration declaration-colon-space-after
3:20 ✖ Expected newline before "}" of a multi-line block block-closing-brace-newline-before
3:20 ✖ Expected a trailing semicolon declaration-block-trailing-semicolon
3:21 ✖ Unexpected missing end-of-source newline no-missing-end-of-source-newline
--- Stylelint Complete ---
--fix
Connect on LinkedIn. Follow me on Twitter. Grab the RSS Feed