From 760a6550584625bbb0cb3013229ba0a19e0d1209 Mon Sep 17 00:00:00 2001 From: Max R Date: Fri, 29 Sep 2023 06:51:19 -0400 Subject: [PATCH] chore: run prettier on `lint` & `lint:fix` (#1313) --- package.json | 4 ++-- src/commands/command.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 138c56d9..d0955bac 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "precoverage": "npx rimraf coverage && npx mkdirp coverage", "coverage": "jest --coverage", "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint": "prettier --check . && eslint .", + "lint:fix": "prettier --write . && eslint . --fix", "prepublishOnly": "npm run build:lib && npm run build:browser.js -- --minify-whitespace --minify-identifiers", "test": "jest", "posttest": "npm run build:lib && npm run test:integration && npm run build:browser.js && npm run test:browser.js", diff --git a/src/commands/command.js b/src/commands/command.js index 23002b73..0df00835 100644 --- a/src/commands/command.js +++ b/src/commands/command.js @@ -78,7 +78,9 @@ export async function command(_subcommand, ...args) { const { getKeyIndexes, exists } = await import('@ioredis/commands') const [cmd, ...subArgs] = args if (!exists(cmd)) { - throw new Error('ERR wrong number of arguments for \'command|getkeys\' command') + throw new Error( + "ERR wrong number of arguments for 'command|getkeys' command" + ) } return getKeyIndexes(cmd, subArgs).map(i => subArgs[i])