add lint script

This commit is contained in:
Thomas Rupprecht 2023-01-05 14:37:59 +01:00
parent 859f9bce19
commit c7dcd6218b

View file

@ -11,12 +11,13 @@
"scripts": { "scripts": {
"copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js", "copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js",
"copy-version": "sed -i 's/^\t\"version\": \".*\",$/\t\"version\": \"'$(rg '^\t\"version\": \"(.+)\",$' -r '$1' < package.json)'\",/' src/manifest.json", "copy-version": "sed -i 's/^\t\"version\": \".*\",$/\t\"version\": \"'$(rg '^\t\"version\": \"(.+)\",$' -r '$1' < package.json)'\",/' src/manifest.json",
"lint": "web-ext lint -w -s src/",
"prebuild": "cp LICENSE.txt src/", "prebuild": "cp LICENSE.txt src/",
"build": "web-ext build -o -s src/ -n \"_usr_space-{version}.zip\"", "build": "web-ext build -o -s src/ -n \"_usr_space-{version}.zip\"",
"postbuild": "rm src/LICENSE.txt", "postbuild": "rm src/LICENSE.txt",
"test": "echo \"Error: no test specified\" && exit 0", "test": "echo \"Error: no test specified\" && exit 0",
"postinstall": "npm run copy-browser-polyfill", "postinstall": "npm run copy-browser-polyfill",
"preversion": "npm test", "preversion": "npm run lint && npm test",
"version": "npm run copy-version && git add -u", "version": "npm run copy-version && git add -u",
"postversion": "npm run build" "postversion": "npm run build"
}, },