Skip to content

Commit

Permalink
Sync prettier and editorconfig, fix npm scripts
Browse files Browse the repository at this point in the history
- Running prettier on Windows caused all files to change from CRLF to LF
- npm scripts didn't work on Windows
- Also fixed syntax in contributing.md

Fixed list syntax in contributing.md
  • Loading branch information
AustinLeeGordon committed Jan 11, 2019
1 parent 169e0f5 commit 13ea9f1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
"semi": false,
"printWidth": 80,
"trailingComma": "all",
"endOfLine": "crlf"
}
11 changes: 5 additions & 6 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
Before submitting a pull request, please make sure the following is done:

1. Fork the repository and create your branch from master.
1. Run `npm build`. This will:
a. Run `npm install` in the repository root.
a. Ensure the test suite passes with`npm test`.
a. Format your code with prettier and eslint using `npm run lint`.

1. If you’ve fixed a bug or added code that should be tested, add tests!
2. Run `npm build`. This will:
1. Run `npm install` in the repository root.
2. Ensure the test suite passes with`npm test`.
3. Format your code with prettier and eslint using `npm run lint`.
3. If you’ve fixed a bug or added code that should be tested, add tests!

Tip: `npm run mocha -- --grep "test name"` is helpful in development.
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "index.js",
"scripts": {
"build": "npm install && npm test && npm run lint",
"test": "NODE_ENV=test npm run lint && npm run mocha && npm run tsc",
"test": "cross-env NODE_ENV=test npm run lint && npm run mocha && npm run tsc",
"coverage": "nyc --reporter=lcov mocha --timeout=10000",
"lint": "npm run prettier && npm run eslint",
"tsc": "tsc",
"ts-node": "ts-node test/typescript/hubspot.ts",
"mocha": "./node_modules/mocha/bin/mocha --recursive test/ --timeout 15000",
"eslint": "./node_modules/eslint/bin/eslint.js . --fix",
"prettier": "./node_modules/prettier/bin-prettier.js --write '{lib,test}/**/*.{j,t}s'",
"watch-test": "./node_modules/mocha/bin/mocha --recursive test/ --timeout 15000 --watch"
"mocha": "mocha --recursive test/ --timeout 15000",
"eslint": "eslint . --fix",
"prettier": "prettier --write {lib,test}/**/*.{js,ts}",
"watch-test": "mocha --recursive test/ --timeout 15000 --watch"
},
"repository": {
"type": "git",
Expand All @@ -39,6 +39,7 @@
"@types/request": "^2.47.0",
"@types/request-promise": "^4.1.41",
"chai": "^4.1.2",
"cross-env": "^5.2.0",
"dotenv": "^6.2.0",
"eslint": "^5.7.0",
"eslint-config-prettier": "^3.3.0",
Expand Down

0 comments on commit 13ea9f1

Please sign in to comment.