@effect/language-service 0.43.2 → 0.44.0
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/README.md +1 -0
- package/effect-lsp-patch-utils.js +3 -1
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +3 -1
- package/transform.js.map +1 -1
package/README.md
CHANGED
|
@@ -109,6 +109,7 @@ Few options can be provided alongside the initialization of the Language Service
|
|
|
109
109
|
"diagnosticSeverity": { // allows to change per-rule default severity of the diagnostic in the whole project
|
|
110
110
|
"floatingEffect": "warning" // example for a rule, allowed values are off,error,warning,message,suggestion
|
|
111
111
|
},
|
|
112
|
+
"diagnosticsName": true, // controls whether to include the rule name in diagnostic messages (default: true)
|
|
112
113
|
"quickinfo": true, // controls Effect quickinfo (default: true)
|
|
113
114
|
"quickinfoEffectParameters": "whenTruncated", // (default: "whenTruncated") controls when to display effect type parameters always,never,whenTruncated
|
|
114
115
|
"quickinfoMaximumLength": -1, // controls how long can be the types in the quickinfo hover (helps with very long type to improve perfs, defaults to -1 for no truncation, can be any number eg. 1000 and TS will try to fit as much as possible in that budget, higher number means more info.)
|
|
@@ -1172,6 +1172,7 @@ var defaults = {
|
|
|
1172
1172
|
refactors: true,
|
|
1173
1173
|
diagnostics: true,
|
|
1174
1174
|
diagnosticSeverity: {},
|
|
1175
|
+
diagnosticsName: true,
|
|
1175
1176
|
quickinfo: true,
|
|
1176
1177
|
quickinfoEffectParameters: "whentruncated",
|
|
1177
1178
|
quickinfoMaximumLength: -1,
|
|
@@ -1208,6 +1209,7 @@ function parse(config) {
|
|
|
1208
1209
|
refactors: isObject(config) && hasProperty(config, "refactors") && isBoolean(config.refactors) ? config.refactors : defaults.refactors,
|
|
1209
1210
|
diagnostics: isObject(config) && hasProperty(config, "diagnostics") && isBoolean(config.diagnostics) ? config.diagnostics : defaults.diagnostics,
|
|
1210
1211
|
diagnosticSeverity: isObject(config) && hasProperty(config, "diagnosticSeverity") && isRecord(config.diagnosticSeverity) ? parseDiagnosticSeverity(config.diagnosticSeverity) : defaults.diagnosticSeverity,
|
|
1212
|
+
diagnosticsName: isObject(config) && hasProperty(config, "diagnosticsName") && isBoolean(config.diagnosticsName) ? config.diagnosticsName : defaults.diagnosticsName,
|
|
1211
1213
|
quickinfo: isObject(config) && hasProperty(config, "quickinfo") && isBoolean(config.quickinfo) ? config.quickinfo : defaults.quickinfo,
|
|
1212
1214
|
quickinfoEffectParameters: isObject(config) && hasProperty(config, "quickinfoEffectParameters") && isString(config.quickinfoEffectParameters) && ["always", "never", "whentruncated"].includes(config.quickinfoEffectParameters.toLowerCase()) ? config.quickinfoEffectParameters.toLowerCase() : defaults.quickinfoEffectParameters,
|
|
1213
1215
|
quickinfoMaximumLength: isObject(config) && hasProperty(config, "quickinfoMaximumLength") && isNumber(config.quickinfoMaximumLength) ? config.quickinfoMaximumLength : defaults.quickinfoMaximumLength,
|
|
@@ -1949,7 +1951,7 @@ var createDiagnosticExecutor = fn("LSP.createCommentDirectivesProcessor")(
|
|
|
1949
1951
|
const node = "kind" in entry.location ? entry.location : tsUtils.findNodeAtPositionIncludingTrivia(sourceFile, entry.location.pos);
|
|
1950
1952
|
applicableDiagnostics.push({
|
|
1951
1953
|
range,
|
|
1952
|
-
messageText: entry.messageText,
|
|
1954
|
+
messageText: pluginOptions.diagnosticsName ? `${entry.messageText} effect(${rule.name})` : entry.messageText,
|
|
1953
1955
|
fixes: entry.fixes.concat(node ? [fixByDisableNextLine(node)] : []).concat([fixByDisableEntireFile])
|
|
1954
1956
|
});
|
|
1955
1957
|
});
|