build: add stylelint

Co-authored-by: David Ralph <me@davidcralph.co.uk>
This commit is contained in:
alexsparkes 2022-04-15 22:55:24 +01:00
parent ec602a0e50
commit 987a7eda6e
3 changed files with 13 additions and 1 deletions

6
.stylelintrc.json Normal file
View File

@ -0,0 +1,6 @@
{
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-prettier-scss"
]
}

View File

@ -33,7 +33,11 @@
"@vitejs/plugin-react": "^1.3.0",
"eslint": "^8.12.0",
"eslint-config-react-app": "^7.0.0",
"prettier": "^2.6.2",
"sass": "^1.50.0",
"stylelint": "^14.7.0",
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^3.0.0",
"vite": "^2.9.1"
},
"scripts": {
@ -41,7 +45,9 @@
"updatetranslations": "cd scripts && node updatetranslations.js",
"build": "vite build",
"chrome": "cp manifest/chrome.json dist/manifest.json && cp -r manifest/_locales dist/_locales && cp manifest/background-chrome.js dist/background-chrome.js",
"firefox": "rm -rf dist/_locales && cp manifest/firefox.json dist/manifest.json"
"firefox": "rm -rf dist/_locales && cp manifest/firefox.json dist/manifest.json",
"pretty": "prettier --write \"./**/*.{js,jsx,json,scss}\"",
"stylelint": "npx stylelint \"**/*.scss\""
},
"browserslist": {
"production": [