-
Notifications
You must be signed in to change notification settings - Fork 9
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
Maintainability Items: linting and typing #69
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3014fe3
deps: add and configure typescript
klardotsh ecdacd5
deps: Install and configure ESLint based on XO defaults.
klardotsh c09b4a0
types: Provide basic structural type hints for zulip-js.
klardotsh 1d7707f
send-message: Port action to strict TypeScript.
klardotsh 79c1ebc
markdown: Lint and fix with prettier.
klardotsh 4cfd4b7
docs: Add contribution guidelines based on zulip/zulip.
klardotsh aac372e
docs: Reformat send-message documentation into a condensed table.
klardotsh dc7e6c7
docs: Document a bot-specific note about which email address to use.
klardotsh 7dadd3d
docs: Clarify required state of topic parameter.
klardotsh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": [ | ||
"xo", | ||
"xo-typescript", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"plugin:unicorn/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"root": true, | ||
"rules": { | ||
// These are incompatible with TypeScript "module: commonjs" | ||
"@typescript-eslint/no-floating-promises": "off", | ||
"unicorn/prefer-top-level-await": "off" | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does it make sense to apply
eslint --fix
in this commit? Usually we do that when configuring a linter.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.
After
eslint --fix
we'll still have 16 non-auto-fixable (and frankly non-trivial even with human intervention) linter errors. I'd wager probably not worth rolling back to try to fix that since the code being fixed gets fully replaced in the next commits anyway, but that's not a hill I'd die on or anything.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.
I had to go back to the add-linting commit anyway to address a commit cleanliness comment from Alex so I met in the middle here if that's cool with you: ran
lint:fix
over the original JS in the commit that adds eslint-config-xo and company, but does not resolve the outstanding 18 (up from 16 because I'd missedeslint-config-xo
not being inherently pulled in byeslint-config-xo-typescript
, oops) non-auto-fixable errors. It does, however, resolve about 50 auto-fixable errors at that point in the commit history.That's all now implemented in ecdacd5