diff --git a/.eslintignore b/.eslintignore index e69de29..8d6919b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -0,0 +1,7 @@ +# do not lint/format generated artifacts +dist/ +package-lock.json +# makes sure that eslintrc.js gets linted/formatted +!.eslintrc.js +# don't lint/format package.json since npm install formats it differently by default +package.json diff --git a/package.json b/package.json index 229e68d..aab0d75 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,9 @@ "build-test-addon-xpi": "./bin/make_xpi.sh", "dist": "webpack", "eslint": "eslint src --ext jsm --ext js --ext json", + "eslint-fix": "npm run eslint -- --fix", + "format": "prettier '**/*.{css,js,jsm,json,md}' --trailing-comma=all --ignore-path=.eslintignore --write", + "postformat": "npm run eslint-fix && fixpack", "predist": "npm run eslint", "prepack": "fixpack && npm run dist", "pretest": "npm run dist && npm run build-test-addon-xpi",