-
Notifications
You must be signed in to change notification settings - Fork 209
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
chore: lint self #10
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,13 @@ | |
"build": "npm run compile", | ||
"clean": "rm -rf ./build/", | ||
"compile": "tsc -p . --rootDir . --outDir build/", | ||
"format-check": "echo \"TODO\"", | ||
"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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd rather have linting pretest? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok :) |
||
}, | ||
"engines": { | ||
"node": ">=4" | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!