Skip to content

chore: lint self #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"build": "npm run compile",
"clean": "rm -rf ./build/",
"compile": "tsc -p . --rootDir . --outDir build/",
"format-check": "echo \"TODO\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need a format check? Or should we just go ahead and auto-format on build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be dangerous if the user has unsaved edits in their editor. A 'test' job should not make edits IMO.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

"format": "clang-format -i -style='{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}' src/*.ts",
"lint": "tslint -c tslint.json --project . --type-check -t codeFrame",
"lint-fix": "tslint -c tslint.json --project . --type-check -t codeFrame --fix",
"release": "standard-version",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"TODO\"",
"posttest": "npm run lint && npm run format-check"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd rather have linting pretest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, in an edit-build-test development cycle I care about lint and format as the very last step once my feature is complete (i.e. I've gotten all the tests to pass).

I find it annouying to be told that my code isn't formatted correctly when I am just trying to see if this is 'functionally correct' w.r.t. tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok :)

},
"engines": {
"node": ">=4"
Expand Down