## 1.3.12, 1.3.13, 1.3.14
This commit is contained in:
parent
eacebd708f
commit
85fa349968
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
type-script-helper-1.3.14.vsix
Normal file
BIN
type-script-helper-1.3.14.vsix
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -105,7 +105,7 @@ Learned npm run compile will do similar to build
|
|||||||
|
|
||||||
Quick Fix - Instance Field to Calisthenics
|
Quick Fix - Instance Field to Calisthenics
|
||||||
|
|
||||||
## 1.3.12
|
## 1.3.12, 1.3.13, 1.3.14
|
||||||
-----------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Split by Space Reverse Join Sort lines (ascending, case sensitive)
|
Split by Space Reverse Join Sort lines (ascending, case sensitive)
|
||||||
|
16
type-script-helper/package-lock.json
generated
16
type-script-helper/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "type-script-helper",
|
"name": "type-script-helper",
|
||||||
"version": "1.3.12",
|
"version": "1.3.13",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "type-script-helper",
|
"name": "type-script-helper",
|
||||||
"version": "1.3.12",
|
"version": "1.3.13",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/glob": "^7.1.1",
|
"@types/glob": "^7.1.1",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
@ -793,9 +793,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimist": {
|
"node_modules/minimist": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/mkdirp": {
|
"node_modules/mkdirp": {
|
||||||
@ -2008,9 +2008,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "Helper for VS Code in TypeScript",
|
"description": "Helper for VS Code in TypeScript",
|
||||||
"publisher": "IFX",
|
"publisher": "IFX",
|
||||||
"repository": "https://github.com/mikepharesjr/YO-VSCode/tree/master/type-script-helper",
|
"repository": "https://github.com/mikepharesjr/YO-VSCode/tree/master/type-script-helper",
|
||||||
"version": "1.3.12",
|
"version": "1.3.14",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.40.0"
|
"vscode": "^1.40.0"
|
||||||
},
|
},
|
||||||
|
@ -151,7 +151,7 @@ function prettySqlLogic(lines: string[]): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function camelCase(str: string) {
|
function camelCase(str: string) {
|
||||||
return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function(match, index) {
|
return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) {
|
||||||
if (+match === 0) return "";
|
if (+match === 0) return "";
|
||||||
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
||||||
});
|
});
|
||||||
@ -169,7 +169,7 @@ function capitalize(word: string) {
|
|||||||
function quickFixCamelCasePropertiesLogic(lines: string[]): void {
|
function quickFixCamelCasePropertiesLogic(lines: string[]): void {
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
let segments = lines[i].trim().split(' ');
|
let segments = lines[i].trim().split(' ');
|
||||||
if(segments.length < 2 || segments.length > 3)
|
if (segments.length < 2 || segments.length > 3)
|
||||||
continue;
|
continue;
|
||||||
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
||||||
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
||||||
@ -182,7 +182,7 @@ function quickFixCamelCasePropertiesLogic(lines: string[]): void {
|
|||||||
function quickFixCS0108Logic(lines: string[]): void {
|
function quickFixCS0108Logic(lines: string[]): void {
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
let segments = lines[i].trim().split(' ');
|
let segments = lines[i].trim().split(' ');
|
||||||
if(segments.length < 2 || segments.length > 3)
|
if (segments.length < 2 || segments.length > 3)
|
||||||
continue;
|
continue;
|
||||||
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
||||||
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
||||||
@ -197,15 +197,15 @@ function quickFixCS0108Logic(lines: string[]): void {
|
|||||||
function quickFixInstanceFieldToCalisthenicsLogic(lines: string[]): void {
|
function quickFixInstanceFieldToCalisthenicsLogic(lines: string[]): void {
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
let segments = lines[i].trim().split(' ');
|
let segments = lines[i].trim().split(' ');
|
||||||
if(segments.length !== 2)
|
if (segments.length !== 2)
|
||||||
continue;
|
continue;
|
||||||
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
||||||
let type = segments[0];
|
let type = segments[0];
|
||||||
let name = segments[1].split(';')[0];
|
let name = segments[1].split(';')[0];
|
||||||
let singularName = name;
|
let singularName = name;
|
||||||
if(name[name.length - 1] === 's') {
|
if (name[name.length - 1] === 's') {
|
||||||
if(name[name.length - 2] === 'e') {
|
if (name[name.length - 2] === 'e') {
|
||||||
if(name[name.length - 3] === 'i') {
|
if (name[name.length - 3] === 'i') {
|
||||||
singularName = name.substring(0, singularName.length - 3) + 'y';
|
singularName = name.substring(0, singularName.length - 3) + 'y';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -215,11 +215,11 @@ function quickFixInstanceFieldToCalisthenicsLogic(lines: string[]): void {
|
|||||||
singularName = name.substring(0, singularName.length - 1);
|
singularName = name.substring(0, singularName.length - 1);
|
||||||
}
|
}
|
||||||
segments = type.split('<');
|
segments = type.split('<');
|
||||||
if(segments.length === 2)
|
if (segments.length === 2)
|
||||||
lines[i] = leftPadding + 'public ' + segments[0] + '<' + singularName + '> ' + name + ' { get; } //' + segments[1].split('>')[0];
|
lines[i] = leftPadding + 'public ' + segments[0] + '<' + singularName + '> ' + name + ' { get; } //' + segments[1].split('>')[0];
|
||||||
else {
|
else {
|
||||||
segments = type.split('[');
|
segments = type.split('[');
|
||||||
if(segments.length === 2)
|
if (segments.length === 2)
|
||||||
lines[i] = leftPadding + 'public ' + singularName + '[] ' + name + ' { get; } //' + segments[0];
|
lines[i] = leftPadding + 'public ' + singularName + '[] ' + name + ' { get; } //' + segments[0];
|
||||||
else
|
else
|
||||||
lines[i] = leftPadding + 'public ' + singularName + ' ' + name + ' { get; } //' + type;
|
lines[i] = leftPadding + 'public ' + singularName + ' ' + name + ' { get; } //' + type;
|
||||||
@ -231,7 +231,7 @@ function quickFixInstanceFieldToCalisthenicsLogic(lines: string[]): void {
|
|||||||
function quickFixProperCasePropertiesLogic(lines: string[]): void {
|
function quickFixProperCasePropertiesLogic(lines: string[]): void {
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
let segments = lines[i].trim().split(' ');
|
let segments = lines[i].trim().split(' ');
|
||||||
if(segments.length < 2 || segments.length > 3)
|
if (segments.length < 2 || segments.length > 3)
|
||||||
continue;
|
continue;
|
||||||
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
||||||
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
||||||
@ -245,7 +245,7 @@ function quickFixProperCasePropertiesLogic(lines: string[]): void {
|
|||||||
function quickFixPublicLogic(lines: string[]): void {
|
function quickFixPublicLogic(lines: string[]): void {
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
let segments = lines[i].trim().split(' ');
|
let segments = lines[i].trim().split(' ');
|
||||||
if(segments.length < 2 || segments.length > 3)
|
if (segments.length < 2 || segments.length > 3)
|
||||||
continue;
|
continue;
|
||||||
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
let leftPadding = lines[i].substring(0, lines[i].indexOf(segments[0]));
|
||||||
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
if (segments.length === 2) segments = ('protected ' + lines[i].trim()).split(' ');
|
||||||
@ -293,11 +293,11 @@ function splitBySpaceReverseJoinSortLogic(lines: string[]): void {
|
|||||||
|
|
||||||
removeBlanks(lines);
|
removeBlanks(lines);
|
||||||
|
|
||||||
|
lines = transformers.reduce((currentLines, transform) => transform(currentLines), lines);
|
||||||
|
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
lines[i] = lines[i].split(' ').reverse().join(' ');
|
lines[i] = lines[i].split(' ').reverse().join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
lines = transformers.reduce((currentLines, transform) => transform(currentLines), lines);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function unwrapSqlLogic(lines: string[]): void {
|
function unwrapSqlLogic(lines: string[]): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user