-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: better options default #263
Merged
Merged
Changes from all commits
Commits
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
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
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 |
---|---|---|
|
@@ -15,34 +15,39 @@ | |
|
||
## How to use | ||
|
||
1. **Install the 'JavaScript Standard Style' extension** | ||
1. **Install the 'StandardJS - JavaScript Standard Style' extension** | ||
|
||
If you don't know how to install extensions in VSCode, take a look at the [documentation](https://code.visualstudio.com/docs/editor/extension-gallery#_browse-and-install-extensions). | ||
Launch VSCode Quick Open (⌘+P), paste the following command, and press enter. | ||
|
||
You will need to reload VSCode before new extensions can be used. | ||
```text | ||
ext install standard.vscode-standard | ||
``` | ||
|
||
For more information, take a look at the [documentation](https://code.visualstudio.com/docs/editor/extension-gallery#_browse-and-install-extensions). | ||
|
||
2. **Install `standard`, `semistandard`, `standardx` or `ts-standard`** | ||
2. **Install the engine `standard`, `semistandard`, `standardx` or `ts-standard`** | ||
|
||
This can be done globally or locally. We recommend that you install them locally (i.e. saved in your project's `devDependencies`), to ensure that other developers have it installed when working on the project. | ||
|
||
3. **Disable the built-in VSCode validator** | ||
3. **Enable the extension** | ||
|
||
To do this, set `"javascript.validate.enable": false` in your VSCode `settings.json`. | ||
That's it! The extension will automatically be enabled in projects that has one of the engines installed in `devDependencies` in `package.json`. | ||
|
||
## Plugin options | ||
## Extension options | ||
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. To make it consistent, we use the word |
||
|
||
We give you some options to customize vscode-standard in your VSCode [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings). | ||
We give you some options to customize `vscode-standard` in your VSCode [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings). | ||
|
||
| Option | Description | Default | | ||
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | | ||
| `standard.enable` | enable or disable JavaScript Standard Style | `true` | | ||
| `standard.enableGlobally` | enable or disable JavaScript Standard Style globally | `false` | | ||
| `standard.run` | run linter `onSave` or `onType` | `onType` | | ||
| `standard.autoFixOnSave` | enable or disable auto fix on save. It is only available when VSCode's `files.autoSave` is either `off`, `onFocusChange` or `onWindowChange`. It will not work with `afterDelay`. | `false` | | ||
| `standard.nodePath` | use this setting if an installed `standard` package can't be detected. | `null` | | ||
| `standard.validate` | an array of language identifiers specify the files to be validated | `["javascript", "javascriptreact", "typescript", "typescriptreact]` | | ||
| `standard.workingDirectories` | an array for working directories to be used. | `[]` | | ||
| `standard.engine` | You can use `semistandard`, `standardx` or `ts-standard` instead of `standard`. **Just make sure you've installed the `semistandard`, the `standardx` or the `ts-standard` package, instead of `standard`.** | `standard` | | ||
| `standard.usePackageJson` | if set to `true`, JavaScript Standard Style will use project's `package.json` settings, otherwise globally installed `standard` module is used | `false` | | ||
| `standard.usePackageJson` | if set to `true`, JavaScript Standard Style will use project's `package.json` settings, otherwise globally installed `standard` module is used | `true` | | ||
| `standard.treatErrorsAsWarnings` | Any linting error reported by Standard will instead be displayed as a warning within VS Code. | `false` | | ||
|
||
## Configuring Standard | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
We don't need to disable this setting while using this extension, and I would encourage to enable it so you can get both linting and javascript errors.