Skip to content

Commit

Permalink
update to LSP 0.0.12 (#89)
Browse files Browse the repository at this point in the history
* update to LSP 0.0.12

* address feedback
  • Loading branch information
maliroteh-sf authored Jul 13, 2021
1 parent e6e7b8b commit 2a5b8f1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [1.4.7]
Updates/enhancements:
- Enable suppression of SLDS warnings in HTML files for mobile via Quick Fix actions. Any HTML content that is between `<!-- sldsValidatorIgnore -->` and `<!-- sldsValidatorAllow -->` will now be exempt from SLDS validation. Furthermore `<!-- sldsValidatorIgnoreNextLine -->` will exempt the next immediate line from SLDS validation. By adding a `<!-- sldsValidatorIgnore -->` at the top of an HTML file with no `<!-- sldsValidatorAllow -->` anywhere else in that file, you can exempt the entire content of the file from SLDS validation.
- New preference flag for SLDS Validator extension. Now using `Salesforce-vscode-slds > Basic : Mobile Validation` flag you can globally enable or disable SLDS validation for mobile.
- Update LSP: https://github.com/forcedotcom/salesforcedx-slds-lsp/releases/tag/v0.0.12
## [1.4.6]
- Update LSP: https://github.com/forcedotcom/salesforcedx-slds-lsp/releases/tag/v0.0.11

Expand Down
4 changes: 4 additions & 0 deletions client/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@ export class Commands {
this.context.updateState(ContextKey.SCOPE, true));
vscode.commands.registerCommand('slds.disable:scope', ()=>
this.context.updateState(ContextKey.SCOPE, false));
vscode.commands.registerCommand('slds.enable:mobileValidation', ()=>
this.context.updateState(ContextKey.SLDS_MOBILE_VALIDATION, true));
vscode.commands.registerCommand('slds.disable:mobileValidation', ()=>
this.context.updateState(ContextKey.SLDS_MOBILE_VALIDATION, false));
}
}
3 changes: 2 additions & 1 deletion client/src/context/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const MAPPINGS: Map<ContextKey, string> = new Map<ContextKey, string>([
[ContextKey.DESIGN_TOKEN, 'basic.designToken'],
[ContextKey.INVALID, 'basic.invalid'],
[ContextKey.UTILITY_CLASS, 'enhancements.utilityClasses'],
[ContextKey.SCOPE, 'file.scopeWithInSFDX']
[ContextKey.SCOPE, 'file.scopeWithInSFDX'],
[ContextKey.SLDS_MOBILE_VALIDATION, 'basic.mobileValidation']
]);

export class SLDSContext {
Expand Down
3 changes: 2 additions & 1 deletion client/src/context/contextKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ export enum ContextKey {
UTILITY_CLASS = "UTILITY_CLASS",
DESIGN_TOKEN = "DESIGN_TOKEN",
AUTO_SUGGEST = "AUTO_SUGGEST",
SCOPE = "SCOPE"
SCOPE = "SCOPE",
SLDS_MOBILE_VALIDATION = "SLDS_MOBILE_VALIDATION"
}
2 changes: 1 addition & 1 deletion client/src/sldsLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function createServerPromise(context: ExtensionContext, outputChannel: OutputCha
}

args.push('-jar');
args.push(path.resolve(context.extensionPath, 'lsp-0.0.11-executable.jar'));
args.push(path.resolve(context.extensionPath, 'lsp-0.0.12-executable.jar'));
args.push(`--PORT=${port.toString()}`);

let process = child_process.spawn(javaExecutablePath, args, options);
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "SLDS Validator",
"publisher": "salesforce",
"description": "Salesforce Lightning Design System",
"version": "1.4.6",
"version": "1.4.7",
"aiKey": "7344b284-73e5-420e-b680-73333da3e067",
"icon": "images/slds-icon.png",
"preview": true,
Expand Down Expand Up @@ -72,6 +72,11 @@
"type": "boolean",
"default": true,
"description": "Enable or disable invalid SLDS utility classes detection"
},
"salesforcedx-vscode-slds.basic.mobileValidation": {
"type": "boolean",
"default": true,
"description": "Enable or disable SLDS validation for mobile"
}
}
},
Expand Down Expand Up @@ -165,6 +170,16 @@
"command": "slds.disable:scope",
"title": "Do not scope SLDS Validator to SFDX project files",
"category": "SLDS"
},
{
"command": "slds.enable:mobileValidation",
"title": "Enable SLDS validation for mobile",
"category": "SLDS"
},
{
"command": "slds.disable:mobileValidation",
"title": "Disable SLDS validation for mobile",
"category": "SLDS"
}
],
"languages": [
Expand Down

0 comments on commit 2a5b8f1

Please sign in to comment.