coc-sonarlint 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -11
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -13110,7 +13110,7 @@ function toggleRule(level) {
|
|
|
13110
13110
|
level = !current || current == "on" ? "off" : "on";
|
|
13111
13111
|
}
|
|
13112
13112
|
let localLevel = !level ? rules[ruleKey] : level;
|
|
13113
|
-
rules =
|
|
13113
|
+
rules = { [ruleKey]: { localLevel }, ...rules };
|
|
13114
13114
|
if (localLevel === "off") {
|
|
13115
13115
|
const result = await coc8.window.showPrompt(
|
|
13116
13116
|
`Are you sure you want to disable rule ${ruleKey}? `
|
|
@@ -13122,11 +13122,7 @@ function toggleRule(level) {
|
|
|
13122
13122
|
coc8.window.showWarningMessage(
|
|
13123
13123
|
`Changed level of rule ${ruleKey} to ${localLevel}`
|
|
13124
13124
|
);
|
|
13125
|
-
return await configuration.update(
|
|
13126
|
-
"rules",
|
|
13127
|
-
rules,
|
|
13128
|
-
coc8.ConfigurationTarget.Global
|
|
13129
|
-
);
|
|
13125
|
+
return await configuration.update("rules", rules);
|
|
13130
13126
|
} else {
|
|
13131
13127
|
const { key, activeByDefault } = ruleKey;
|
|
13132
13128
|
let localLevel = level;
|
|
@@ -13147,11 +13143,7 @@ function toggleRule(level) {
|
|
|
13147
13143
|
delete rules[key];
|
|
13148
13144
|
}
|
|
13149
13145
|
coc8.window.showWarningMessage(`Changed level of rule ${key} to ${localLevel}`);
|
|
13150
|
-
return await configuration.update(
|
|
13151
|
-
"rules",
|
|
13152
|
-
rules,
|
|
13153
|
-
coc8.ConfigurationTarget.Global
|
|
13154
|
-
);
|
|
13146
|
+
return await configuration.update("rules", rules);
|
|
13155
13147
|
}
|
|
13156
13148
|
};
|
|
13157
13149
|
}
|