]> git.lizzy.rs Git - rust.git/commitdiff
enforce camel case
authorAleksey Kladov <aleksey.kladov@gmail.com>
Fri, 21 Feb 2020 10:22:45 +0000 (11:22 +0100)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Fri, 21 Feb 2020 10:22:45 +0000 (11:22 +0100)
editors/code/.eslintrc.js
editors/code/src/color_theme.ts
editors/code/src/commands/expand_macro.ts
editors/code/src/installation/fetch_artifact_release_info.ts

index 113a8a78e9b1ba1d026e38177168c4764d3a5699..5cda886ed68dcfbe52f778140fb24aae62221164 100644 (file)
@@ -12,6 +12,7 @@ module.exports = {
         "@typescript-eslint"
     ],
     "rules": {
+        "camelcase": ["error"],
         "@typescript-eslint/member-delimiter-style": [
             "error",
             {
index 2f2a39877e91878555ea9a627d510dd6dc7ff27a..5b9327b28a4a77c75015373f851c17fecbc22594 100644 (file)
@@ -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;
index 6fee6eb41ce636572f0f8f596ab7d43627be208c..edec9bbc132b95fcb7fbb8341caa5de43f85d94e 100644 (file)
@@ -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> {
index 71889e82a5004dedd7d16dd3a677551011558617..1e764718c96199e7b4bae425f802a51499943851 100644 (file)
@@ -46,6 +46,7 @@ export async function fetchArtifactReleaseInfo(
         name: string;
         assets: Array<{
             name: string;
+            // eslint-disable-next-line camelcase
             browser_download_url: string;
         }>;
     }