From 987a7eda6e849eb82375692a7c01ce843751f85d Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Fri, 15 Apr 2022 22:55:24 +0100 Subject: [PATCH] build: add stylelint Co-authored-by: David Ralph --- .prettierrc => .prettierrc.json | 0 .stylelintrc.json | 6 ++++++ package.json | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) rename .prettierrc => .prettierrc.json (100%) create mode 100644 .stylelintrc.json diff --git a/.prettierrc b/.prettierrc.json similarity index 100% rename from .prettierrc rename to .prettierrc.json diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 00000000..13945df0 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "stylelint-config-standard-scss", + "stylelint-config-prettier-scss" + ] +} diff --git a/package.json b/package.json index c964beb7..55cfff90 100644 --- a/package.json +++ b/package.json @@ -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": [