Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
confirm IT solutions
Development Guidelines
Commits
a5e68036
Commit
a5e68036
authored
Apr 19, 2021
by
Dominique Barton
🦄
Browse files
TEST: Add testing for stylelint
parent
8294ae5e
Pipeline
#8552
passed with stage
in 24 seconds
Changes
6
Pipelines
18
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a5e68036
...
...
@@ -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
...
...
configs/stylelintrc.yml
View file @
a5e68036
...
...
@@ -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
:
...
...
test/Makefile
View file @
a5e68036
...
...
@@ -18,7 +18,7 @@ install-python:
install-node
:
npm
install
install
:
install-python install-n
pm
install
:
install-python install-n
ode
#
# 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
test/files/test.css
0 → 100644
View file @
a5e68036
body
{
color
:
hello
;
background-color
:
#000
;
border-color
:
black
;
}
body
{
color
:
#ffffff
;
}
foo
{
color
:
#000000
;
}
x-foo
{
color
:
#000000
;
}
test/output/stylelint.txt
0 → 100644
View file @
a5e68036
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
test/package.json
View file @
a5e68036
{
"dependencies"
:
{
"eslint"
:
"latest"
"eslint"
:
"latest"
,
"stylelint"
:
"latest"
,
"stylelint-config-standard"
:
"latest"
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment