Commit a5e68036 authored by Dominique Barton's avatar Dominique Barton 🦄
Browse files

TEST: Add testing for stylelint

parent 8294ae5e
Pipeline #8552 passed with stage
in 24 seconds
......@@ -18,12 +18,13 @@ Test Python:
- dev
- docker
Test JavaScript:
Test JavaScript & CSS:
stage: test
image: node:15
script:
- make -C test install-node
- make -C test test-eslint
- make -C test test-stylelint
interruptible: true
tags:
- dev
......
......@@ -7,10 +7,26 @@ extends: stylelint-config-standard
rules:
#
# Colors
#
color-hex-length: long
color-named: never
#
# Syntax
#
indentation: 4
declaration-colon-space-before: null
#
# Selectors
#
selector-type-no-unknown:
- true
- ignore:
......
......@@ -18,7 +18,7 @@ install-python:
install-node:
npm install
install: install-python install-npm
install: install-python install-node
#
# Test
......@@ -39,4 +39,7 @@ test-coverage:
test-eslint:
./validateOutput.sh "npx --silent eslint -c ../configs/eslintrc.yml files/test.js" output/eslint.txt
test-stylelint:
./validateOutput.sh "npx --silent stylelint --config ../configs/stylelintrc.yml files/test.css" output/stylelint.txt
test: test-isort test-pycodestyle test-pylint test-coverage test-eslint
body {
color : hello;
background-color: #000;
border-color : black;
}
body {
color: #ffffff;
}
foo {
color: #000000;
}
x-foo {
color: #000000;
}
files/test.css
3:23 ✖ Expected "#000" to be "#000000" color-hex-length
4:23 ✖ Unexpected named color "black" color-named
7:1 ✖ Unexpected duplicate selector "body", first used at line 1 no-duplicate-selectors
11:1 ✖ Unexpected unknown type selector "foo" selector-type-no-unknown
13:5 ✖ Unexpected empty line before declaration declaration-empty-line-before
19:1 ✖ Unexpected empty line before closing brace block-closing-brace-empty-line-before
{
"dependencies": {
"eslint": "latest"
"eslint": "latest",
"stylelint": "latest",
"stylelint-config-standard": "latest"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment