mirror of
https://git.proxmox.com/git/pve-eslint
synced 2025-10-09 12:38:59 +00:00
eslint: autofixes
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5fad4d8186
commit
8e4082d9d6
11
src/app.js
11
src/app.js
@ -34,7 +34,7 @@ const defaultConfig = {
|
|||||||
ecmaVersion: 2017,
|
ecmaVersion: 2017,
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
impliedStrict: true,
|
impliedStrict: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
@ -197,7 +197,7 @@ const defaultConfig = {
|
|||||||
"no-mixed-operators": "warn",
|
"no-mixed-operators": "warn",
|
||||||
"no-multiple-empty-lines": "warn",
|
"no-multiple-empty-lines": "warn",
|
||||||
"no-trailing-spaces": "warn",
|
"no-trailing-spaces": "warn",
|
||||||
"no-underscore-dangle": [ "warn", { allowAfterThis: true, }],
|
"no-underscore-dangle": ["warn", { allowAfterThis: true }],
|
||||||
"no-unneeded-ternary": "warn",
|
"no-unneeded-ternary": "warn",
|
||||||
"no-whitespace-before-property": "warn",
|
"no-whitespace-before-property": "warn",
|
||||||
"object-curly-newline": "warn",
|
"object-curly-newline": "warn",
|
||||||
@ -229,8 +229,8 @@ if (program.config) {
|
|||||||
path = process.cwd() + "/" + path;
|
path = process.cwd() + "/" + path;
|
||||||
}
|
}
|
||||||
config = {
|
config = {
|
||||||
extends: path
|
"extends": path,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const cli = new eslint.CLIEngine({
|
const cli = new eslint.CLIEngine({
|
||||||
@ -300,7 +300,7 @@ report.results.forEach(function(result) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (report.results.length > 1) {
|
if (report.results.length > 1) {
|
||||||
console.log((`${color.bold(files_ok.length + files_err.length)} files:`));
|
console.log(`${color.bold(files_ok.length + files_err.length)} files:`);
|
||||||
if (files_err.length > 0) {
|
if (files_err.length > 0) {
|
||||||
console.log(color.red(`${color.bold(files_err.length)} files have Errors`));
|
console.log(color.red(`${color.bold(files_err.length)} files have Errors`));
|
||||||
}
|
}
|
||||||
@ -329,5 +329,4 @@ if (program.fix) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
process.exit(exitcode);
|
process.exit(exitcode);
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
Loading…
Reference in New Issue
Block a user