Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

style(js): Add standardjs linter #223

Merged
merged 2 commits into from
Mar 14, 2018
Merged

style(js): Add standardjs linter #223

merged 2 commits into from
Mar 14, 2018

Conversation

bengourley
Copy link
Contributor

The lack of a linter, coupled with tests not covering all branches of the JS, allowed #217 to
happen. This adds linting to the CI job, and if the relevant editor plugins are installed shows lint
errors inside the editor.

Closes #217.


The standardjs linter is used on our js notifier, so I think it makes sense for consistency to use the same one here.

Most of the lint issues were fixed easily using standard --fix but there were a couple of places where "unidiomatic" JS was used, and these were swapped for expressions that made the linter happy… e.g.

null/undefined check: value != undefined -> [ null, undefined ].includes(value)

The lack of a linter, coupled with tests not covering all branches of the JS, allowed #217 to
happen. This adds linting to the CI job, and if the relevant editor plugins are installed shows lint
errors inside the editor.

Closes #217.
@bengourley bengourley requested a review from kattrali March 13, 2018 10:51
@kattrali kattrali merged commit d4eccdd into master Mar 14, 2018
@kattrali kattrali deleted the lint-js branch March 14, 2018 11:06
Jekiwijaya pushed a commit to Jekiwijaya/bugsnag-react-native that referenced this pull request Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants