Skip to content

Commit

Permalink
Fixes microsoft#1203: Using eslint.nodePath globally rather than lo…
Browse files Browse the repository at this point in the history
…cally, yet on every new window: `The eslint.nodePath setting requires user confirmation. To do so execute the Select Node Path command.`
  • Loading branch information
dbaeumer authored and Sebastianokunkelo committed Mar 16, 2021
1 parent 5386439 commit 8553b07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2.1.19

- fixe [Using `eslint.nodePath` globally rather than locally, yet on every new window: `The eslint.nodePath setting requires user confirmation. To do so execute the Select Node Path command.`](https://github.com/microsoft/vscode-eslint/issues/1203)

### 2.1.18

- warn about nodePath values being defined separately in the workspace folder although a multi workspace folder setup is open.
Expand Down
7 changes: 4 additions & 3 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1312,9 +1312,10 @@ function realActivate(context: ExtensionContext): void {
} else {
// The setting is not confirmed. So always take the global value.
value = (inspect.globalValue ?? inspect.defaultValue ?? undefined) as (T | undefined | null);
// If confirmedSettings is undefined we need to check whether there was a value local that is different from the
// global value. If so still take the global value but let the user know that he can confirm a local value.
if (confirmedSettings === undefined && (inspect.workspaceValue !== value || inspect.workspaceFolderValue !== value)) {
// If confirmedSettings is undefined we need to check whether there was a value local either as a workspace or
// workspace folder value. It is enough to check for undefined since values not in scope default to undefined (e.g.
// the folder value is undefined if a workspace is open).
if (confirmedSettings === undefined && (inspect.workspaceValue !== undefined || inspect.workspaceFolderValue !== undefined)) {
confirm = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-eslint",
"displayName": "ESLint",
"description": "Integrates ESLint JavaScript into VS Code.",
"version": "2.1.18",
"version": "2.1.19",
"author": "Microsoft Corporation",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 8553b07

Please sign in to comment.