Skip to content

Commit 1ffe291

Browse files
sverrejohJakob Werner
authored andcommitted
Remove removeLeadingDot option, making it the default (#18)
The leading dot is redundant, and should never be there. Some IDE's rightfully complain about this.
1 parent ab009a7 commit 1ffe291

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ The following Visual Studio Code settings are available for the RelativePath ext
2626
// Excludes the extension from the relative path url (Useful for systemjs imports).
2727
"relativePath.removeExtension": false,
2828

29-
// Removes the leading ./ character when the path is pointing to a parent folder.
30-
"relativePath.removeLeadingDot": false
31-
3229
// An array of extensions to exclude from the relative path url (Useful for used with Webpack or when importing files of mixed types)
3330
"relativePath.excludedExtensions": [
3431
".js"

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@
6060
"default": false,
6161
"description": "Excludes the extension from the relative path url (Useful for systemjs imports)."
6262
},
63-
"relativePath.removeLeadingDot": {
64-
"type": "boolean",
65-
"default": false,
66-
"description": "Removes the leading ./ character when the path is pointing to a parent folder."
67-
},
6863
"relativePath.excludedExtensions": {
6964
"type": "array",
7065
"default": [
@@ -95,4 +90,4 @@
9590
"@types/glob": "^5.0.29",
9691
"glob": "^7.0.6"
9792
}
98-
}
93+
}

src/extension.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ class RelativePath {
185185
} else if (this.excludeExtensionsFor(relativeUrl)) {
186186
relativeUrl = relativeUrl.substring(0, relativeUrl.lastIndexOf("."));
187187
}
188-
if (this._configuration.removeLeadingDot && relativeUrl.startsWith("./../")) {
188+
189+
if (relativeUrl.startsWith("./../")) {
189190
relativeUrl = relativeUrl.substring(2, relativeUrl.length);
190191
}
191192

@@ -223,4 +224,4 @@ class RelativePath {
223224
dispose() {
224225
this._items = null;
225226
}
226-
}
227+
}

0 commit comments

Comments
 (0)