-
Notifications
You must be signed in to change notification settings - Fork 931
refactor(cli): port cli to typescript #978
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
Closed
Closed
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8142287
refactor(cli): port cli to typescript
armano2 8670c15
chore(cli): cleanup code
armano2 b58696a
fix(cli): cleanup code and add missing dependencies
armano2 50afa34
fix(cli): restore original options array
armano2 f819a4c
fix(cli): set cli as executable
armano2 bb12a02
fix(cli): attempt to fix permissions on linux
armano2 27b1ccd
fix(cli): improve help format and setup version command
armano2 3d889a0
fix(cli): restore condition after refactoring
armano2 93f1e63
chore(cli): add missing todo
armano2 63123de
chore(cli): add missing type
armano2 e4efb34
chore: add missing new line in help and update CI doc
armano2 3a17ad8
docs: update default of cwd
armano2 8b57a0c
fix(cli): update published files
armano2 422b833
refactor(cli): rename cli-bin to cli
armano2 3f3d2e0
refactor(cli): add custom CliError and fix printing help
armano2 1f1e6a1
chore(cli): fix package.json
armano2 a0c4bb3
refactor(cli): use camelCase cli flag names
armano2 6fea4cf
fix: unify rule config types
marionebl 4e12277
chore: drop no longer used package (issue after rebase)
armano2 17504f2
chore: remove todo comment as its already resolved
armano2 db186dd
fix: enable strict mode to reproduce previous behavior
armano2 4246081
chore: rollback some unnecessary changes
armano2 712f4cd
test(cli): add unit test for help and version commands
armano2 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 hidden or 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,2 @@ | ||
#!/usr/bin/env node | ||
require('./lib/cli.js'); |
This file contains hidden or 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const path = require('path'); | ||
|
||
module.exports = path.join(__dirname, 'lib/cli.js'); | ||
module.exports = path.join(__dirname, 'cli.js'); |
This file contains hidden or 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
This file contains hidden or 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,13 @@ | ||
export class CliError extends Error { | ||
__proto__ = Error; | ||
|
||
public type: string; | ||
|
||
constructor(message: string, type: string) { | ||
super(message); | ||
|
||
this.type = type; | ||
|
||
Object.setPrototypeOf(this, CliError.prototype); | ||
} | ||
} |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.