🚨(app-desk) add css linter

eslint is not enough for css, so we need a css linter too.
This commit adds stylelint to the project, we configure it
with prettier and add a check during the build process.
This commit is contained in:
Anthony LC
2024-01-10 11:01:31 +01:00
committed by Anthony LC
parent 58f99545c0
commit 05d9f6430d
7 changed files with 961 additions and 36 deletions

View File

@@ -4,11 +4,12 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "prettier --check . && yarn stylelint && next build",
"build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes",
"start": "next start",
"lint": "next lint",
"prettier": "prettier --write ."
"prettier": "prettier --write .",
"stylelint": "stylelint \"**/*.css\""
},
"dependencies": {
"@openfun/cunningham-react": "2.4.0",
@@ -26,6 +27,9 @@
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.2",
"prettier": "3.1.1",
"stylelint": "16.1.0",
"stylelint-config-standard": "36.0.0",
"stylelint-prettier": "5.0.0",
"typescript": "5"
}
}