diff --git a/generation/.prettierrc b/generation/.prettierrc new file mode 100644 index 0000000000..082bcddc9f --- /dev/null +++ b/generation/.prettierrc @@ -0,0 +1,3 @@ +{ + "useTabs": true +} \ No newline at end of file diff --git a/generation/package.json b/generation/package.json index 4a2df37e53..1674dc3f28 100644 --- a/generation/package.json +++ b/generation/package.json @@ -6,16 +6,27 @@ "private": true, "scripts": { "build": "./index.js", - "test": "jest" + "test": "jest", + "precommit": "lint-staged", + "format": "prettier ./**/*.{js,json,css,md} --write" }, "author": "DanielMSchmidt ", "license": "MIT", + "lint-staged": { + "*.{js,json,css,md}": [ + "prettier --write", + "git add" + ] + }, "devDependencies": { "babel-generator": "^6.25.0", "babel-types": "^6.25.0", + "husky": "^0.14.3", "jest": "^20.0.4", "lerna": "2.0.0-rc.4", + "lint-staged": "^6.0.0", "objective-c-parser": "1.1.0", + "prettier": "^1.8.2", "remove": "^0.1.5" }, "jest": {