diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..45537e54 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +/release/ +/src/lib/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..e1b5c6fc --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "arrowParens": "always", + "singleQuote": true, + "trailingComma": "none", + "semi": true, + "useTabs": true +} diff --git a/package.json b/package.json index c7323e31..ddf6b84f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "compile": "mrmdir ./release && npm run compile-amd && npm run compile-esm", "watch": "tsc -p ./src --watch", "prepublishOnly": "npm run compile && node ./scripts/bundle && mcopy ./src/monaco.d.ts ./release/monaco.d.ts", - "import-typescript": "node ./scripts/importTypescript" + "import-typescript": "node ./scripts/importTypescript", + "prettier": "prettier --write ." }, "author": "Microsoft Corporation", "license": "MIT", @@ -21,9 +22,12 @@ }, "devDependencies": { "@typescript/vfs": "^1.3.0", + "husky": "^4.3.0", "monaco-editor-core": "^0.20.0", "monaco-languages": "^1.10.0", "monaco-plugin-helpers": "^1.0.3", + "prettier": "^2.1.1", + "pretty-quick": "^3.0.0", "requirejs": "^2.3.6", "terser": "^5.3.0", "typescript": "^4.0.2"