Fix linting-messages
This commit is contained in:
parent
7015fa994a
commit
2dceaf9520
2 changed files with 81 additions and 14 deletions
59
.vscode/tasks.json
vendored
59
.vscode/tasks.json
vendored
|
@ -7,15 +7,20 @@
|
||||||
"label": "Debug",
|
"label": "Debug",
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "build",
|
"script": "build",
|
||||||
"group": "build",
|
"problemMatcher": [
|
||||||
"problemMatcher": "$tsc"
|
"$gulp-tsc",
|
||||||
|
"$node-sass"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Release",
|
"label": "Release",
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "release",
|
"script": "release",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"problemMatcher": "$tsc"
|
"problemMatcher": [
|
||||||
|
"$gulp-tsc",
|
||||||
|
"$node-sass"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Watch Debug",
|
"label": "Watch Debug",
|
||||||
|
@ -25,7 +30,24 @@
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
},
|
},
|
||||||
"problemMatcher": "$tsc-watch",
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"base": "$gulp-tsc",
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": false,
|
||||||
|
"beginsPattern": "^(Starting compilation in watch mode|File change detected. Starting incremental compilation)",
|
||||||
|
"endsPattern": "^Found \\d+ errors. Watching for file changes."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"base": "$node-sass",
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": false,
|
||||||
|
"beginsPattern": "^Rebuilding scss-code.",
|
||||||
|
"endsPattern": "^Rebuilding scss-code finished."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
|
@ -36,7 +58,24 @@
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch-release",
|
"script": "watch-release",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"problemMatcher": "$tsc-watch",
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"base": "$gulp-tsc",
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": false,
|
||||||
|
"beginsPattern": "^(Starting compilation in watch mode|File change detected. Starting incremental compilation)",
|
||||||
|
"endsPattern": "^Found \\d+ errors. Watching for file changes."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"base": "$node-sass",
|
||||||
|
"background": {
|
||||||
|
"activeOnStart": false,
|
||||||
|
"beginsPattern": "^Rebuilding scss-code.",
|
||||||
|
"endsPattern": "^Rebuilding scss-code finished."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
|
@ -64,13 +103,19 @@
|
||||||
"label": "Rebuild",
|
"label": "Rebuild",
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "rebuild",
|
"script": "rebuild",
|
||||||
"problemMatcher": "$tsc"
|
"problemMatcher": [
|
||||||
|
"$gulp-tsc",
|
||||||
|
"$node-sass"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Rebuild Release",
|
"label": "Rebuild Release",
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "rebuild-release",
|
"script": "rebuild-release",
|
||||||
"problemMatcher": "$tsc"
|
"problemMatcher": [
|
||||||
|
"$gulp-tsc",
|
||||||
|
"$node-sass"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Lint",
|
"label": "Lint",
|
||||||
|
|
36
gulpfile.ts
36
gulpfile.ts
|
@ -260,8 +260,9 @@ export async function Library()
|
||||||
|
|
||||||
if (!errorMessages.includes(message))
|
if (!errorMessages.includes(message))
|
||||||
{
|
{
|
||||||
|
let result = new RegExp(`^(${error["fileName"]})\\((\\d+|\\d+(,\\d+){1,3})\\): .* TS([\\d]+): (.*)$`).exec(message);
|
||||||
errorMessages.push(message);
|
errorMessages.push(message);
|
||||||
log.error(message);
|
console.log(`${Path.relative(process.cwd(), result[1])}(${result[2]}): ${result[4]} ${result[5]}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
).pipe(
|
).pipe(
|
||||||
|
@ -333,6 +334,11 @@ Library.description = "Builds the TypeScript- and JavaScript-library.";
|
||||||
*/
|
*/
|
||||||
export async function Theme()
|
export async function Theme()
|
||||||
{
|
{
|
||||||
|
if (settings.Watch)
|
||||||
|
{
|
||||||
|
console.log("Rebuilding scss-code.");
|
||||||
|
}
|
||||||
|
|
||||||
return gulp.src(
|
return gulp.src(
|
||||||
settings.ThemeSource("main.scss"),
|
settings.ThemeSource("main.scss"),
|
||||||
{
|
{
|
||||||
|
@ -341,15 +347,23 @@ export async function Theme()
|
||||||
}).pipe(
|
}).pipe(
|
||||||
sass(
|
sass(
|
||||||
{
|
{
|
||||||
importer: require("node-sass-tilde-importer"),
|
importer: require("node-sass-tilde-importer")
|
||||||
outputStyle: settings.Debug ? "expanded" : "compressed"
|
|
||||||
}
|
}
|
||||||
).on("error",
|
).on("error",
|
||||||
(error) =>
|
(error) =>
|
||||||
{
|
{
|
||||||
log.error(
|
console.log(
|
||||||
`${error.relativePath}:${error.line}:${error.column}\n` +
|
JSON.stringify(
|
||||||
`${error.messageFormatted}`);
|
{
|
||||||
|
status: error.status,
|
||||||
|
file: error.file,
|
||||||
|
line: error.line,
|
||||||
|
column: error.column,
|
||||||
|
message: error.messageOriginal,
|
||||||
|
formatted: error.formatted
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
4));
|
||||||
})
|
})
|
||||||
).pipe(
|
).pipe(
|
||||||
rename(
|
rename(
|
||||||
|
@ -367,7 +381,15 @@ export async function Theme()
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
undefined)
|
undefined)
|
||||||
);
|
).on(
|
||||||
|
"end",
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
if (settings.Watch)
|
||||||
|
{
|
||||||
|
console.log("Rebuilding scss-code finished.")
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme.description = "Builds the theme.";
|
Theme.description = "Builds the theme.";
|
||||||
|
|
Loading…
Reference in a new issue