diff options
author | Justin Reynolds <justinr1234@gmail.com> | 2019-06-26 19:15:59 -0500 |
---|---|---|
committer | Justin Reynolds <justinr1234@gmail.com> | 2019-06-27 09:19:29 -0500 |
commit | 3d63b6006b13942a887bbeddebb055d697451223 (patch) | |
tree | ef64c00f146add91a484f7f6b27a40a785f459a0 /package.json | |
parent | 7d86af2b004ed57d4295b1396fe24a14c8407c56 (diff) | |
download | wekan-3d63b6006b13942a887bbeddebb055d697451223.tar.gz wekan-3d63b6006b13942a887bbeddebb055d697451223.tar.bz2 wekan-3d63b6006b13942a887bbeddebb055d697451223.zip |
Auto linting on commit
Diffstat (limited to 'package.json')
-rw-r--r-- | package.json | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/package.json b/package.json index cdddb4be..0c0312b6 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,29 @@ "description": "Open-Source kanban", "private": true, "scripts": { - "lint": "eslint --ignore-pattern 'packages/*' .", + "lint": "eslint --cache --ext .js --ignore-path .eslintignore .", + "lint:eslint:fix": "eslint --ext .js --ignore-path .eslintignore --fix .", + "lint:staged": "lint-staged", "prettify": "prettier --write '**/*.js' '**/*.jsx'", "test": "npm run --silent lint" }, + "lint-staged": { + "*.js": [ + "meteor npm run prettify", + "meteor npm run lint:eslint:fix", + "git add --force" + ], + "*.jsx": [ + "meteor npm run prettify", + "meteor npm run lint:eslint:fix", + "git add --force" + ], + "*.json": [ + "prettier --write", + "git add --force" + ] + }, + "pre-commit": "lint:staged", "eslintConfig": { "extends": "@meteorjs/eslint-config-meteor" }, @@ -28,6 +47,8 @@ "eslint-plugin-import": "^2.18.0", "eslint-plugin-meteor": "^4.2.2", "eslint-plugin-prettier": "^3.1.0", + "lint-staged": "^7.3.0", + "pre-commit": "^1.2.2", "prettier": "^1.18.2", "prettier-eslint": "^8.8.2" }, |