Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable and upgrade stylelint in pre-commit #1388

Merged
merged 38 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
77e56ce
Refactor folder structure
TwistMeister Jun 29, 2023
b43d2a6
Enable stylelint
TwistMeister Jun 29, 2023
0e01758
Remove old dependencies
TwistMeister Jun 29, 2023
ade32d6
Update .stylelintrc.json
TwistMeister Jun 29, 2023
bcc8256
Update pre-commit-config
Darwinkel Jul 3, 2023
d0ddeac
Limit to css folder
Darwinkel Jul 3, 2023
1d78fac
Setup and run stylelint fix errors
TwistMeister Jul 3, 2023
cf0785e
Enable stylelint and fix errors
TwistMeister Jul 12, 2023
523a9bb
Resolving linter issues
HeleenSG Jul 12, 2023
e289d66
Linter fixes
HeleenSG Jul 13, 2023
8361ee3
Merge main and fix conflicts
Darwinkel Jul 13, 2023
fdd2d71
Update pre-commit
Darwinkel Jul 13, 2023
d17e15f
Merge branch 'main' into feature/stylelint-fixes
Darwinkel Jul 13, 2023
6b39c17
Merge main and fix conflicts
Darwinkel Jul 13, 2023
f901dcc
Update pre-commit config
Darwinkel Jul 13, 2023
c5df49a
Restore removed files
Darwinkel Jul 13, 2023
93c6c05
Fix removed files
Darwinkel Jul 13, 2023
d926283
Restore removed files
Darwinkel Jul 13, 2023
4ff66ca
Merge branch 'main' into feature/stylelint-fixes
Darwinkel Jul 13, 2023
cc471da
Re-add ignored pyc file
Darwinkel Jul 13, 2023
3e09479
Merge branch 'feature/stylelint-fixes' of github.com:minvws/nl-kat-co…
Darwinkel Jul 13, 2023
8c4790a
Merge branch 'main' into feature/stylelint-fixes
Darwinkel Jul 13, 2023
c4bc2fc
Merge branch 'main' into feature/stylelint-fixes
Darwinkel Jul 14, 2023
102560f
Merge branch 'main' into feature/stylelint-fixes
TwistMeister Jul 18, 2023
5d90ac6
Merge branch 'feature/stylelint-fixes' of https://github.com/minvws/n…
TwistMeister Jul 18, 2023
922c835
Delete yarn.lock
TwistMeister Jul 18, 2023
7ded444
Restore removed files
Darwinkel Jul 19, 2023
5c181f9
Add sanity check to pyc test
Darwinkel Jul 19, 2023
a0d71fa
Merge branch 'main' into feature/stylelint-fixes
Darwinkel Jul 19, 2023
5ae9c56
Remove old `dist` and `node_modules` folder when running `make reset`
Darwinkel Jul 19, 2023
92559a1
Also remove parcel cache
Darwinkel Jul 19, 2023
3c49346
Merge branch 'main' into feature/stylelint-fixes
Darwinkel Jul 20, 2023
d21b57b
Fixes yarn build
HeleenSG Jul 26, 2023
ab923a4
Merge branch 'main' into feature/stylelint-fixes
ammar92 Aug 29, 2023
4c481e2
pre-commit config updates
ammar92 Aug 29, 2023
dd9a0b2
Fixed import source
ammar92 Aug 30, 2023
ea30eff
Merge branch 'main' into feature/stylelint-fixes
underdarknl Aug 30, 2023
a44b6eb
Merge branch 'main' into feature/stylelint-fixes
underdarknl Aug 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
args: ["--fix=lf"]
args: [ "--fix=lf" ]
- id: detect-private-key
- id: check-case-conflict
- id: check-yaml
Expand All @@ -24,8 +24,8 @@ repos:
hooks:
- id: rstcheck
# https://github.com/rstcheck/rstcheck-core/issues/4
args: ["--ignore-messages", "Hyperlink target .* is not referenced"]
additional_dependencies: ["rstcheck[sphinx]"]
args: [ "--ignore-messages", "Hyperlink target .* is not referenced" ]
additional_dependencies: [ "rstcheck[sphinx]" ]

- repo: https://github.com/MarketSquare/robotframework-tidy
rev: "4.1.0"
Expand Down Expand Up @@ -84,8 +84,8 @@ repos:
^boefjes/tests/examples/inputs/cve-result-without-cvss.json |
^keiko/glossaries |
^keiko/templates/.*/template.tex$ |
^rocky/assets/js/vendor |
^rocky/assets/src/bundles/app/css/themes/soft/fonts/tabler-icons/tabler-icons.scss$ |
^rocky/assets/vendors |
^rocky/assets/css/themes/soft/fonts/tabler-icons/tabler-icons.scss$ |
^rocky/tests/stubs |
^docs/source/_static
)
Expand All @@ -96,12 +96,12 @@ repos:
- id: djlint-django
files: '^rocky/.*/templates/.*$'

# - repo: https://github.com/thibaudcolas/pre-commit-stylelint
# rev: v15.4.0
# hooks:
# - id: stylelint
# args: [--fix]
# additional_dependencies:
# - stylelint@15.4.0
# - stylelint-config-standard-scss@8.0.0
# files: "^(rocky\/assets\/src\/|docs\/source\/).*.(css|scss|sass)$"
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
rev: v15.10.1
hooks:
- id: stylelint
args: [ --fix ]
additional_dependencies:
- stylelint@15.10.1
- stylelint-config-standard-scss@10.0.0
files: "^(rocky\/assets\/css\/|docs\/source\/).*.(css|scss|sass)$"
5 changes: 4 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "stylelint-config-standard-scss",
"ignoreFiles": ["rocky/assets/css/themes/soft/fonts/tabler-icons/tabler-icons.scss"],
"rules": {
"number-max-precision": 5,
"color-hex-length": "long",
Expand All @@ -8,7 +9,9 @@
true,
{
"ignoreFontFamilies": [
"RO Icons"
"RO Icons",
"tabler-icons",
"kat-icons"
]
}
]
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ down:
# Remove containers and all volumes (data loss!)
clean:
-docker-compose down --timeout 0 --volumes --remove-orphans
-rm -Rf rocky/node_modules rocky/assets/dist rocky/.parcel-cache

# Fetch the latest changes from the Git remote
fetch:
Expand Down
7 changes: 7 additions & 0 deletions boefjes/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ def test_correct_local_runner_hash(self) -> None:
# This boefje has a __pycache__ folder with *.pyc files, which should be ignored
boefje_resource_3 = local_repository.by_id("dummy_boefje_environment_with_pycache")

# Sanity check to make sure the .pyc files are actually there
path = Path(__file__).parent / "modules" / "dummy_boefje_environment_with_pycache"
assert Path(path / "some_subdir/cache.pyc").is_file()
assert Path(path / "some_subdir/__init__.py").is_file()
assert Path(path / "__pycache__/pytest__init__.cpython-311.pyc").is_file()
assert Path(path / "__pycache__/pytest_main.cpython-311.pyc").is_file()

assert boefje_resource_1.runnable_hash == "b07a0ecbb24e49843188a24e5298b9d614535c0ec1761e76366b6d8747515e7a"
assert boefje_resource_2.runnable_hash == "1d97b303499cc7ea79c4bb419a79bd5eea750c6430ddd759b7af22383e873a7e"
assert boefje_resource_3.runnable_hash == "67f956d89b2e2c5948f2090ac52eb752e2e65393df207180d8c24a6dea13b555"
2 changes: 1 addition & 1 deletion rocky/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.html
*.min.js
assets/dist/
assets/js/vendor/
assets/vendors/
14 changes: 14 additions & 0 deletions rocky/assets/css/abstracts/alert-colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Alert colors

$grey: #cccccc;
$offwhite: #fafafa;
$lightgrey: #f0f0f0;
$pink: #ca005d;
$blue: #01689b;

:root {
--color-alert-informative: #006fb3;
--color-alert-warning: #7d6900;
--color-alert-positive: #157b31;
--color-alert-negative: #c3372c;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
height: auto;
list-style: none;
}

margin: 0;
padding: 0;
position: static;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
0% {
transform: rotate(-10deg);
}

100% {
transform: rotate(10deg);
}
}

@keyframes paw {
0% {
transform: rotate(20deg);
}

100% {
transform: rotate(-40deg);
}
Expand All @@ -20,6 +23,7 @@
justify-content: center;
margin: 3rem auto;
}

.cat-loader {
height: 13rem;
position: relative;
Expand All @@ -31,13 +35,15 @@
position: absolute;
top: 8rem;
}

.ball {
animation: ball 1s alternate infinite ease-in-out;
left: 1.5rem;
position: absolute;
top: 9.5rem;
transform-origin: center bottom;
}

.head {
position: absolute;
top: 1rem;
Expand All @@ -50,20 +56,24 @@
top: 8rem;
transform-origin: center top;
}

.line {
left: 2rem;
position: absolute;
top: 11.5rem;
}

.body {
display: block;
position: absolute;
top: 4rem;
}

.ear-left {
left: 0.5rem;
position: absolute;
}

.ear-right {
left: 3rem;
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
opacity: 0.1;
}
}

.cat-paw-loader {
display: flex;
justify-content: flex-start;
Expand All @@ -17,15 +18,19 @@
&:nth-child(2) {
animation-delay: 250ms;
}

&:nth-child(3) {
animation-delay: 500ms;
}

&:nth-child(4) {
animation-delay: 750ms;
}

&:nth-child(5) {
animation-delay: 1000ms;
}

&:nth-child(6) {
animation-delay: 1250ms;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Dropdown listing */

.dropdown-list {
-webkit-box-shadow: var(--language-selector-list-box-shadow);
box-shadow: var(--language-selector-list-box-shadow);
border-radius: var(--language-selector-list-border-radius);
border-width: var(--language-selector-list-border-width);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
>ul {
padding: 0;
display: none;
background-color: #fff;
background-color: #ffffff;
list-style-type: disc;
margin-block-end: 0;
margin-block-start: 0;
Expand Down Expand Up @@ -60,7 +60,7 @@
}

&[aria-current="true"] {
a:before {
a::before {
content: "\ea5e";
font-family: var(--language-selector-list-button-icon-font-family);
margin-left: var(--language-selector-list-button-icon-margin-left);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.affected-objects {
span:not(:last-child) {
&:after {
&::after {
content: "-";
display: inline-block;
}
Expand Down
Loading