Skip to content

Commit

Permalink
chore: Merge eslint validate option instead of overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeart authored Dec 13, 2023
2 parents 3aa81bb + af58c5f commit 8e0bda7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ updateLanguageSettings('glimmer-js');
updateLanguageSettings('glimmer-ts');

const eslintConfig = vscode.workspace.getConfiguration('eslint');
const validate = eslintConfig.get('validate') ?? [];
const glimmerScopes = ['glimmer-ts', 'glimmer-js'];

eslintConfig.update('validate', ['glimmer-ts', 'glimmer-js'], vscode.ConfigurationTarget.Global);
eslintConfig.update('validate', Array.from(new Set([...validate, ...glimmerScopes])), vscode.ConfigurationTarget.Workspace);

export async function activate(context: vscode.ExtensionContext) {
const extension = vscode.extensions.getExtension(typeScriptExtensionId);
Expand Down

0 comments on commit 8e0bda7

Please sign in to comment.