mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-26 11:55:04 +00:00
enforce camel case
This commit is contained in:
parent
04dacb9943
commit
28bf731751
4 changed files with 8 additions and 6 deletions
|
@ -12,6 +12,7 @@ module.exports = {
|
||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"camelcase": ["error"],
|
||||||
"@typescript-eslint/member-delimiter-style": [
|
"@typescript-eslint/member-delimiter-style": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,11 +83,11 @@ function loadThemeNamed(themeName: string): ColorTheme {
|
||||||
res.mergeFrom(loadThemeFile(themePath));
|
res.mergeFrom(loadThemeFile(themePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
const global_customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations');
|
const globalCustomizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations');
|
||||||
res.mergeFrom(ColorTheme.fromRules(global_customizations?.textMateRules ?? []));
|
res.mergeFrom(ColorTheme.fromRules(globalCustomizations?.textMateRules ?? []));
|
||||||
|
|
||||||
const theme_customizations: any = vscode.workspace.getConfiguration('editor.tokenColorCustomizations').get(`[${themeName}]`);
|
const themeCustomizations: any = vscode.workspace.getConfiguration('editor.tokenColorCustomizations').get(`[${themeName}]`);
|
||||||
res.mergeFrom(ColorTheme.fromRules(theme_customizations?.textMateRules ?? []));
|
res.mergeFrom(ColorTheme.fromRules(themeCustomizations?.textMateRules ?? []));
|
||||||
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -31,7 +31,7 @@ interface ExpandedMacro {
|
||||||
expansion: string;
|
expansion: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function code_format(expanded: ExpandedMacro): string {
|
function codeFormat(expanded: ExpandedMacro): string {
|
||||||
let result = `// Recursive expansion of ${expanded.name}! macro\n`;
|
let result = `// Recursive expansion of ${expanded.name}! macro\n`;
|
||||||
result += '// ' + '='.repeat(result.length - 3);
|
result += '// ' + '='.repeat(result.length - 3);
|
||||||
result += '\n\n';
|
result += '\n\n';
|
||||||
|
@ -65,7 +65,7 @@ class TextDocumentContentProvider
|
||||||
|
|
||||||
if (expanded == null) return 'Not available';
|
if (expanded == null) return 'Not available';
|
||||||
|
|
||||||
return code_format(expanded);
|
return codeFormat(expanded);
|
||||||
}
|
}
|
||||||
|
|
||||||
get onDidChange(): vscode.Event<vscode.Uri> {
|
get onDidChange(): vscode.Event<vscode.Uri> {
|
||||||
|
|
|
@ -46,6 +46,7 @@ export async function fetchArtifactReleaseInfo(
|
||||||
name: string;
|
name: string;
|
||||||
assets: Array<{
|
assets: Array<{
|
||||||
name: string;
|
name: string;
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
browser_download_url: string;
|
browser_download_url: string;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue