build: refactor linting

This commit is contained in:
iCrawl
2023-08-22 09:40:11 +02:00
parent 2e40a05adf
commit d37632da05
72 changed files with 427 additions and 530 deletions

View File

@@ -1,8 +0,0 @@
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"extends": "../../.eslintrc.json",
"rules": {
"import/extensions": 0,
"no-restricted-globals": 0
}
}

View File

@@ -7,8 +7,8 @@
"build": "tsup && node scripts/postbuild.mjs",
"build:docs": "tsc -p tsconfig.docs.json",
"test": "jest --coverage",
"lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty",
"format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty",
"lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src __tests__",
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src __tests__",
"fmt": "yarn format",
"docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
"prepack": "yarn lint && yarn test && yarn build",
@@ -79,7 +79,7 @@
"cross-env": "^7.0.3",
"esbuild-plugin-version-injector": "^1.2.0",
"eslint": "^8.47.0",
"eslint-config-neon": "^0.1.47",
"eslint-config-neon": "^0.1.54",
"eslint-formatter-pretty": "^5.0.0",
"jest": "^29.6.3",
"jest-websocket-mock": "^2.4.1",

View File

@@ -17,7 +17,6 @@ const libs = {
return null;
},
close: (opusPacket: Buffer, nonce: Buffer, secretKey: Uint8Array) => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
const output = Buffer.allocUnsafe(opusPacket.length + sodium.crypto_box_MACBYTES);
sodium.crypto_secretbox_easy(output, opusPacket, nonce, secretKey);
return output;