Skip to content

Commit

Permalink
update eslint to 9.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jul 10, 2024
1 parent 9aff330 commit f39c742
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 151 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

38 changes: 0 additions & 38 deletions .eslintrc

This file was deleted.

51 changes: 51 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import globals from "globals";
import babelParser from "@babel/eslint-parser";
import js from "@eslint/js";

export default [
{
ignores: [
"**/lib",
"**/node_modules",
"**/scripts",
"test/output",
"test/fixtures",
],
},
js.configs.recommended,
{
languageOptions: {
globals: globals.node,
parser: babelParser,
ecmaVersion: "latest",
sourceType: "module",
},

rules: {
camelcase: "off",
"consistent-return": "off",
curly: ["error", "multi-line"],
"linebreak-style": ["error", "unix"],
"max-len": ["error", 110, 2],
"new-cap": "off",
"no-cond-assign": "off",
"no-confusing-arrow": "error",
"no-console": "off",
"no-constant-condition": "off",
"no-empty": "off",
"no-fallthrough": "off",
"no-inner-declarations": "off",
"no-labels": "off",
"no-loop-func": "off",
"no-process-exit": "off",
"no-return-assign": "off",
"no-shadow": "off",
"no-underscore-dangle": "off",
"no-unreachable": "off",
"no-use-before-define": "off",
strict: "off",
},
},
eslintPluginPrettierRecommended,
];
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
"@babel/preset-env": "^7.23.3",
"ava": "^3.13.0",
"c8": "^8.0.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint": "^9.6.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.8.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"prettier": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let hashType = "sha256";
// use md5 hashing if sha256 is not available
try {
crypto.createHash(hashType);
} catch (err) {
} catch {
hashType = "md5";
}

Expand Down Expand Up @@ -98,7 +98,7 @@ const handleCache = async function (directory, params) {
// No errors mean that the file was previously cached
// we just need to return it
return await read(file, cacheCompression);
} catch (err) {}
} catch {}

const fallback =
typeof cacheDirectory !== "string" && directory !== os.tmpdir();
Expand Down
1 change: 0 additions & 1 deletion test/cache.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ test("should output json.gz files to standard cache dir by default", async t =>
t.true(files.length > 0);
});

// eslint-disable-next-line max-len
test("should output non-compressed files to standard cache dir when cacheCompression is set to false", async t => {
const config = Object.assign({}, globalConfig, {
output: {
Expand Down
Loading

0 comments on commit f39c742

Please sign in to comment.