Skip to content

Commit 7ce257c

Browse files
chore(format): run eslint and prettier separately
1 parent 48f1e72 commit 7ce257c

7 files changed

Lines changed: 13 additions & 52 deletions

File tree

eslint.config.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22
import tseslint from 'typescript-eslint';
33
import unusedImports from 'eslint-plugin-unused-imports';
4-
import prettier from 'eslint-plugin-prettier';
54

65
export default tseslint.config(
76
{
@@ -14,11 +13,9 @@ export default tseslint.config(
1413
plugins: {
1514
'@typescript-eslint': tseslint.plugin,
1615
'unused-imports': unusedImports,
17-
prettier,
1816
},
1917
rules: {
2018
'no-unused-vars': 'off',
21-
'prettier/prettier': 'error',
2219
'unused-imports/no-unused-imports': 'error',
2320
'no-restricted-imports': [
2421
'error',

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@typescript-eslint/parser": "8.31.1",
4949
"deep-object-diff": "^1.1.9",
5050
"eslint": "^9.39.1",
51-
"eslint-plugin-prettier": "^5.4.1",
5251
"eslint-plugin-unused-imports": "^4.1.4",
5352
"iconv-lite": "^0.6.3",
5453
"jest": "^29.4.0",

scripts/fast-format

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ if ! [ -z "$ESLINT_FILES" ]; then
3131
fi
3232

3333
echo "==> Running prettier --write"
34-
# format things eslint didn't
35-
PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
36-
if ! [ -z "$PRETTIER_FILES" ]; then
37-
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
38-
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
39-
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
34+
if ! [ -z "$FILE_LIST" ]; then
35+
cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \
36+
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown
4037
fi

scripts/format

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ echo "==> Running eslint --fix"
88
./node_modules/.bin/eslint --fix .
99

1010
echo "==> Running prettier --write"
11-
# format things eslint didn't
12-
./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
11+
./node_modules/.bin/prettier --write --cache --cache-strategy metadata .

scripts/lint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7+
echo "==> Running prettier --check"
8+
./node_modules/.bin/prettier --check .
9+
710
echo "==> Running eslint"
811
./node_modules/.bin/eslint .
912

src/internal/types.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
4040
: T extends (...args: infer A) => unknown ? A
4141
: never;
4242

43-
/* eslint-disable */
4443
/**
4544
* These imports attempt to get types from a parent package's dependencies.
4645
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
6362
*
6463
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
6564
*/
66-
/** @ts-ignore For users with \@types/node */
65+
/** @ts-ignore For users with \@types/node */ /* prettier-ignore */
6766
type UndiciTypesRequestInit = NotAny<import('undici-types').RequestInit> | NotAny<import('undici-types').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
68-
/** @ts-ignore For users with undici */
67+
/** @ts-ignore For users with undici */ /* prettier-ignore */
6968
type UndiciRequestInit = NotAny<import('undici').RequestInit> | NotAny<import('undici').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
70-
/** @ts-ignore For users with \@types/bun */
69+
/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
7170
type BunRequestInit = globalThis.FetchRequestInit;
72-
/** @ts-ignore For users with node-fetch@2 */
71+
/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
7372
type NodeFetch2RequestInit = NotAny<import('node-fetch').RequestInit> | NotAny<import('node-fetch').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
74-
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
73+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
7574
type NodeFetch3RequestInit = NotAny<import('node-fetch.js').RequestInit> | NotAny<import('node-fetch.js').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
76-
/** @ts-ignore For users who use Deno */
75+
/** @ts-ignore For users who use Deno */ /* prettier-ignore */
7776
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
78-
/* eslint-enable */
7977

8078
type RequestInits =
8179
| NotAny<UndiciTypesRequestInit>

yarn.lock

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -776,11 +776,6 @@
776776
resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda"
777777
integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==
778778

779-
"@pkgr/core@^0.2.4":
780-
version "0.2.4"
781-
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c"
782-
integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==
783-
784779
"@sinclair/typebox@^0.27.8":
785780
version "0.27.8"
786781
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
@@ -1758,14 +1753,6 @@ escape-string-regexp@^4.0.0:
17581753
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
17591754
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
17601755

1761-
eslint-plugin-prettier@^5.4.1:
1762-
version "5.4.1"
1763-
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af"
1764-
integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==
1765-
dependencies:
1766-
prettier-linter-helpers "^1.0.0"
1767-
synckit "^0.11.7"
1768-
17691756
eslint-plugin-unused-imports@^4.1.4:
17701757
version "4.1.4"
17711758
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738"
@@ -1973,11 +1960,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
19731960
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
19741961
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
19751962

1976-
fast-diff@^1.1.2:
1977-
version "1.3.0"
1978-
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0"
1979-
integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==
1980-
19811963
fast-glob@^3.3.2:
19821964
version "3.3.2"
19831965
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
@@ -3360,13 +3342,6 @@ prelude-ls@^1.2.1:
33603342
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
33613343
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
33623344

3363-
prettier-linter-helpers@^1.0.0:
3364-
version "1.0.0"
3365-
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
3366-
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
3367-
dependencies:
3368-
fast-diff "^1.1.2"
3369-
33703345
prettier@^3.0.0:
33713346
version "3.1.1"
33723347
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
@@ -3803,13 +3778,6 @@ supports-preserve-symlinks-flag@^1.0.0:
38033778
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
38043779
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
38053780

3806-
synckit@^0.11.7:
3807-
version "0.11.8"
3808-
resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457"
3809-
integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==
3810-
dependencies:
3811-
"@pkgr/core" "^0.2.4"
3812-
38133781
test-exclude@^6.0.0:
38143782
version "6.0.0"
38153783
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e"

0 commit comments

Comments
 (0)