From 0c39a97c18d2411ad92e71e4156c2cdce6e59493 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Sat, 2 Dec 2017 17:49:24 +0100 Subject: [PATCH] add prettier formatting --- generation/.prettierrc | 3 +++ generation/package.json | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 generation/.prettierrc 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": {