add lint script

This commit is contained in:
Thomas Rupprecht 2023-01-05 14:37:59 +01:00
parent 859f9bce19
commit c7dcd6218b
1 changed files with 2 additions and 1 deletions

View File

@ -11,12 +11,13 @@
"scripts": {
"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",
"lint": "web-ext lint -w -s src/",
"prebuild": "cp LICENSE.txt src/",
"build": "web-ext build -o -s src/ -n \"_usr_space-{version}.zip\"",
"postbuild": "rm src/LICENSE.txt",
"test": "echo \"Error: no test specified\" && exit 0",
"postinstall": "npm run copy-browser-polyfill",
"preversion": "npm test",
"preversion": "npm run lint && npm test",
"version": "npm run copy-version && git add -u",
"postversion": "npm run build"
},