diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2020-02-21 11:22:45 +0100 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2020-02-21 11:22:45 +0100 |
| commit | 28bf731751ecf248ea891b07c274dadcb3b7f157 (patch) | |
| tree | e43d7323191a992fa8b604b245de333f130569b5 /editors/code | |
| parent | 04dacb994349848873f9b2576d53685630883300 (diff) | |
| download | rust-28bf731751ecf248ea891b07c274dadcb3b7f157.tar.gz rust-28bf731751ecf248ea891b07c274dadcb3b7f157.zip | |
enforce camel case
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/.eslintrc.js | 1 | ||||
| -rw-r--r-- | editors/code/src/color_theme.ts | 8 | ||||
| -rw-r--r-- | editors/code/src/commands/expand_macro.ts | 4 | ||||
| -rw-r--r-- | editors/code/src/installation/fetch_artifact_release_info.ts | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/editors/code/.eslintrc.js b/editors/code/.eslintrc.js index 113a8a78e9b..5cda886ed68 100644 --- a/editors/code/.eslintrc.js +++ b/editors/code/.eslintrc.js @@ -12,6 +12,7 @@ module.exports = { "@typescript-eslint" ], "rules": { + "camelcase": ["error"], "@typescript-eslint/member-delimiter-style": [ "error", { diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts index 2f2a39877e9..5b9327b28a4 100644 --- a/editors/code/src/color_theme.ts +++ b/editors/code/src/color_theme.ts @@ -83,11 +83,11 @@ function loadThemeNamed(themeName: string): ColorTheme { res.mergeFrom(loadThemeFile(themePath)); } - const global_customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations'); - res.mergeFrom(ColorTheme.fromRules(global_customizations?.textMateRules ?? [])); + const globalCustomizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations'); + res.mergeFrom(ColorTheme.fromRules(globalCustomizations?.textMateRules ?? [])); - const theme_customizations: any = vscode.workspace.getConfiguration('editor.tokenColorCustomizations').get(`[${themeName}]`); - res.mergeFrom(ColorTheme.fromRules(theme_customizations?.textMateRules ?? [])); + const themeCustomizations: any = vscode.workspace.getConfiguration('editor.tokenColorCustomizations').get(`[${themeName}]`); + res.mergeFrom(ColorTheme.fromRules(themeCustomizations?.textMateRules ?? [])); return res; diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts index 6fee6eb41ce..edec9bbc132 100644 --- a/editors/code/src/commands/expand_macro.ts +++ b/editors/code/src/commands/expand_macro.ts @@ -31,7 +31,7 @@ interface ExpandedMacro { expansion: string; } -function code_format(expanded: ExpandedMacro): string { +function codeFormat(expanded: ExpandedMacro): string { let result = `// Recursive expansion of ${expanded.name}! macro\n`; result += '// ' + '='.repeat(result.length - 3); result += '\n\n'; @@ -65,7 +65,7 @@ class TextDocumentContentProvider if (expanded == null) return 'Not available'; - return code_format(expanded); + return codeFormat(expanded); } get onDidChange(): vscode.Event<vscode.Uri> { diff --git a/editors/code/src/installation/fetch_artifact_release_info.ts b/editors/code/src/installation/fetch_artifact_release_info.ts index 71889e82a50..1e764718c96 100644 --- a/editors/code/src/installation/fetch_artifact_release_info.ts +++ b/editors/code/src/installation/fetch_artifact_release_info.ts @@ -46,6 +46,7 @@ export async function fetchArtifactReleaseInfo( name: string; assets: Array<{ name: string; + // eslint-disable-next-line camelcase browser_download_url: string; }>; } |
