diff --git a/.gitignore b/.gitignore index 83b42c1a11..7c44745732 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,13 @@ node_modules build build-tests -# vscode -.vscode +# VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history # Lock files -package-lock.json \ No newline at end of file +package-lock.json diff --git a/.travis.yml b/.travis.yml index 7f7616d645..334c39ac30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,12 @@ install: script: - npm run lint - npm test -after_failure: + - npm run style +after_failure: - "cat /home/travis/builds/dolanmiu/docx/npm-debug.log" after_success: - bash ./deploy-docs.sh env: global: - ENCRYPTION_LABEL: "ad385fa3b525" - + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..2469f92403 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "cSpell.words": [ + "clippy", + "docx", + "dolan", + "miu", + "officegen", + "typedoc" + ], + "prettier.trailingComma": "all", + "prettier.printWidth": 140, + "editor.formatOnSave": false, + "prettier.tabWidth": 4, + "prettier.arrowParens": "always", + "prettier.bracketSpacing": true, +} diff --git a/package.json b/package.json index 0b960e86a6..a2f6a022a2 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "tsc": "rimraf ./build && tsc -p .", "webpack": "rimraf ./build && webpack", "demo": "npm run build && node ./demo", - "typedoc": "npm run build && typedoc --out docs/ src/ --module commonjs --target ES6 --disableOutputCheck" + "typedoc": "npm run build && typedoc --out docs/ src/ --module commonjs --target ES6 --disableOutputCheck", + "style": "prettier -l --trailing-comma all --print-width 140 --arrow-parens always \"src/**/*.ts\"" }, "files": [ "src", @@ -61,6 +62,7 @@ "chai": "^3.5.0", "mocha": "^3.2.0", "mocha-webpack": "^1.0.1", + "prettier": "^1.10.2", "prompt": "^1.0.0", "rimraf": "^2.5.2", "shelljs": "^0.7.7",