mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
build: refactor linting
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/eslintrc.json",
|
||||
"extends": "../../.eslintrc.json"
|
||||
}
|
||||
@@ -7,8 +7,8 @@
|
||||
"test": "vitest run",
|
||||
"build": "tsup",
|
||||
"build:docs": "tsc -p tsconfig.docs.json",
|
||||
"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",
|
||||
@@ -77,7 +77,7 @@
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-config-neon": "^0.1.54",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^3.0.2",
|
||||
"supertest": "^6.3.3",
|
||||
|
||||
@@ -21,7 +21,7 @@ export function proxyRequests(rest: REST): RequestHandler {
|
||||
// The 2nd parameter is here so the URL constructor doesn't complain about an "invalid url" when the origin is missing
|
||||
// we don't actually care about the origin and the value passed is irrelevant
|
||||
const parsedUrl = new URL(url, 'http://noop');
|
||||
// eslint-disable-next-line unicorn/no-unsafe-regex, prefer-named-capture-group
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
const fullRoute = parsedUrl.pathname.replace(/^\/api(\/v\d+)?/, '') as RouteLike;
|
||||
|
||||
const headers: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user