@effect/language-service 0.23.0 → 0.23.1
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 +5 -5
- package/index.js +7 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ This package implements a TypeScript language service plugin that allows additio
|
|
|
6
6
|
|
|
7
7
|
1. `npm install @effect/language-service --save-dev` in your project
|
|
8
8
|
2. inside your tsconfig.json, you should add the plugin configuration as follows:
|
|
9
|
-
```
|
|
9
|
+
```jsonc
|
|
10
10
|
{
|
|
11
11
|
"compilerOptions": {
|
|
12
12
|
"plugins": [
|
|
@@ -72,7 +72,7 @@ And you're done! You'll now be able to use a set of refactor and diagnostics tha
|
|
|
72
72
|
|
|
73
73
|
Few options can be provided alongside the initialization of the Language Service Plugin.
|
|
74
74
|
|
|
75
|
-
```
|
|
75
|
+
```jsonc
|
|
76
76
|
{
|
|
77
77
|
"compilerOptions": {
|
|
78
78
|
"plugins": [
|
|
@@ -101,7 +101,7 @@ TypeScript LSP are loaded only while editing your files. That means that if you
|
|
|
101
101
|
HOWEVER, if you use `ts-patch` you can enable the transform as well to get the diagnostics also at compile time.
|
|
102
102
|
Your `tsconfig.json` should look like this:
|
|
103
103
|
|
|
104
|
-
```
|
|
104
|
+
```jsonc
|
|
105
105
|
{
|
|
106
106
|
"compilerOptions": {
|
|
107
107
|
"plugins": [
|
|
@@ -143,7 +143,7 @@ Effect.succeed(1); // This will be reported as a floating effect
|
|
|
143
143
|
|
|
144
144
|
or you can set the severity for the entire project in the global plugin configuration
|
|
145
145
|
|
|
146
|
-
```
|
|
146
|
+
```jsonc
|
|
147
147
|
{
|
|
148
148
|
"compilerOptions": {
|
|
149
149
|
"plugins": [
|
|
@@ -169,7 +169,7 @@ If you did not installed the Svelte LSP into your local project but instead thro
|
|
|
169
169
|
|
|
170
170
|
Your tsconfig should look like this:
|
|
171
171
|
|
|
172
|
-
```
|
|
172
|
+
```jsonc
|
|
173
173
|
{
|
|
174
174
|
"compilerOptions": {
|
|
175
175
|
"plugins": [
|
package/index.js
CHANGED
|
@@ -3686,6 +3686,13 @@ var getImportFromBarrelCodeActions = fn("getImportFromBarrelCodeActions")(functi
|
|
|
3686
3686
|
const importClause = statement.importClause;
|
|
3687
3687
|
if (importClause && importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) {
|
|
3688
3688
|
const namedImports = importClause.namedBindings;
|
|
3689
|
+
const existingImportSpecifier = namedImports.elements.find(
|
|
3690
|
+
(element) => element.name.text.toLowerCase() === barrelExportName.toLowerCase()
|
|
3691
|
+
);
|
|
3692
|
+
if (existingImportSpecifier) {
|
|
3693
|
+
foundImportDeclaration = true;
|
|
3694
|
+
break;
|
|
3695
|
+
}
|
|
3689
3696
|
changeTracker.replaceNode(
|
|
3690
3697
|
sourceFile,
|
|
3691
3698
|
namedImports,
|