Lint more

This commit is contained in:
Will Scullin 2020-04-23 20:57:59 -07:00
parent 9f34078f30
commit d23940dea8
No known key found for this signature in database
GPG Key ID: 9092A5C0A673416B
3 changed files with 18 additions and 16 deletions

View File

@ -1 +1,3 @@
dist
json/disks/index.js
node_modules

View File

@ -27,22 +27,22 @@ for (const fileName of dir.sort()) {
}
index.sort((x,y) => {
const xc = x.category.toLowerCase();
const yc = y.category.toLowerCase();
const xn = x.name.toLowerCase();
const yn = y.name.toLowerCase();
const xc = x.category.toLowerCase();
const yc = y.category.toLowerCase();
const xn = x.name.toLowerCase();
const yn = y.name.toLowerCase();
if (xc < yc) {
return -1;
} else if (xc > yc) {
return 1;
} else if (xn < yn) {
return -1;
} else if (xn > yn) {
return 1;
} else {
return 0;
}
if (xc < yc) {
return -1;
} else if (xc > yc) {
return 1;
} else if (xn < yn) {
return -1;
} else if (xn > yn) {
return 1;
} else {
return 0;
}
});
fs.writeFileSync(

View File

@ -6,7 +6,7 @@
"build": "webpack --mode=production",
"dev": "webpack-dev-server",
"index": "scripts/index.pl > json/disks/index.js",
"lint": "eslint js",
"lint": "eslint .",
"start": "webpack-dev-server",
"test": "jest"
},