diff --git a/.eslintignore b/.eslintignore index 17a09ef..71f4f8a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,3 @@ +dist json/disks/index.js +node_modules diff --git a/bin/index b/bin/index index 44324f8..13e1fdc 100755 --- a/bin/index +++ b/bin/index @@ -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( diff --git a/package.json b/package.json index 29c6c41..d98d386 100644 --- a/package.json +++ b/package.json @@ -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" },