README
VS Code extensions for frontend development at artnet
Configuring the SonarLint extension
Project-level SonarLint settings should be configured in the .vscode/settings.json
file in each repo, but SonarLint also relies on some global settings. These settings should go in your User Settings file in VS Code.
To set this up:
Prerequisites
Install the Java SDK and determine the location of your JAVA_HOME. On Mac, the easiest way to see your JAVA_HOME location is to run:
$ /usr/libexec/java_home
User Settings
- In VS Code, open Preferences > Settings
- Click '...' in the upper right corner of the settings window and choose 'Open settings.json'
- Set
javaHome
to the JAVA_HOME location on your machine. For example:
"sonarlint.ls.javaHome": "/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home",
Generate a security token for your account in SonarCloud. Go to the My Account section and click on the Security tab (direct link: https://sonarcloud.io/account/security/). Enter "vscode" or whatever you like for the token name and copy the generated token to your clipboard. (Note: The generated token will only appear once, but you can always generate a new token if needed.)
Add the following options, replacing TOKEN_GOES_HERE
with the real SonarCloud token you copied.
"sonarlint.connectedMode.servers": [
{
"serverId": "artnet",
"serverUrl": "https://sonarcloud.io",
"organizationKey": "artnet",
"token": "TOKEN_GOES_HERE"
}
],
Development
To add or remove extensions, simply edit the extensionPack
section of package.json
. Full documentation on developing extension packs is available here:
https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup
Publishing
First install the vsce
tool:
npm install -g vsce
After authenticating as explained at https://code.visualstudio.com/api/working-with-extensions/publishing-extension, publishing can be done simply by running:
vsce publish
See the wiki of this repo for additional details on authenticating.