Skip to content

Commit c753924

Browse files
chore(format): run eslint and prettier separately
1 parent 48e7a85 commit c753924

11 files changed

Lines changed: 45 additions & 84 deletions

File tree

.github/workflows/release-doctor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ jobs:
1919
bash ./bin/check-release-environment
2020
env:
2121
NPM_TOKEN: ${{ secrets.IMAGE_KIT_NPM_TOKEN || secrets.NPM_TOKEN }}
22-

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CHANGELOG.md
22
/ecosystem-tests/*/**
33
/node_modules
44
/deno
5+
/packages/mcp-server/cloudflare-worker/worker-configuration.d.ts
56

67
# don't format tsc output, will break source maps
78
dist

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
@@ -38,7 +38,6 @@
3838
"@typescript-eslint/eslint-plugin": "8.31.1",
3939
"@typescript-eslint/parser": "8.31.1",
4040
"eslint": "^9.39.1",
41-
"eslint-plugin-prettier": "^5.4.1",
4241
"eslint-plugin-unused-imports": "^4.1.4",
4342
"iconv-lite": "^0.6.3",
4443
"jest": "^29.4.0",

packages/mcp-server/cloudflare-worker/worker-configuration.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable */
1+
22
// Generated by Wrangler by running `wrangler types` (hash: fc286f4a60f8eb63b1e0d82ea1f34233)
33
// Runtime types generated with workerd@1.20260124.0 2025-03-10 nodejs_compat
44
declare namespace Cloudflare {
@@ -29,7 +29,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
2929
See the Apache Version 2.0 License for specific language governing permissions
3030
and limitations under the License.
3131
***************************************************************************** */
32-
/* eslint-disable */
32+
3333
// noinspection JSUnusedGlobalSymbols
3434
declare var onmessage: never;
3535
/**

packages/mcp-server/cloudflare-worker/wrangler.jsonc

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@
33
* https://developers.cloudflare.com/workers/wrangler/configuration/
44
*/
55
{
6-
"$schema": "node_modules/wrangler/config-schema.json",
7-
"name": "imagekit-nodejs-api-mcp-server",
8-
"main": "src/index.ts",
9-
"compatibility_date": "2025-03-10",
10-
"compatibility_flags": ["nodejs_compat"],
11-
"migrations": [
12-
{
13-
"new_sqlite_classes": ["MyMCP"],
14-
"tag": "v1"
15-
}
16-
],
17-
"durable_objects": {
18-
"bindings": [
19-
{
20-
"class_name": "MyMCP",
21-
"name": "MCP_OBJECT"
22-
}
23-
]
24-
},
25-
"kv_namespaces": [
26-
{
27-
"binding": "OAUTH_KV",
28-
"id": "ae6fe7d7993146a9b8d54d87f73b0bdf"
29-
}
30-
],
31-
"observability": {
32-
"enabled": true
33-
},
34-
"assets": { "directory": "./static/", "binding": "ASSETS" }
6+
"$schema": "node_modules/wrangler/config-schema.json",
7+
"name": "imagekit-nodejs-api-mcp-server",
8+
"main": "src/index.ts",
9+
"compatibility_date": "2025-03-10",
10+
"compatibility_flags": ["nodejs_compat"],
11+
"migrations": [
12+
{
13+
"new_sqlite_classes": ["MyMCP"],
14+
"tag": "v1"
15+
}
16+
],
17+
"durable_objects": {
18+
"bindings": [
19+
{
20+
"class_name": "MyMCP",
21+
"name": "MCP_OBJECT"
22+
}
23+
]
24+
},
25+
"kv_namespaces": [
26+
{
27+
"binding": "OAUTH_KV",
28+
"id": "ae6fe7d7993146a9b8d54d87f73b0bdf"
29+
}
30+
],
31+
"observability": {
32+
"enabled": true
33+
},
34+
"assets": { "directory": "./static/", "binding": "ASSETS" }
3535
}

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('../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> | 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('../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> | 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_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> | 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_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> | 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>

0 commit comments

Comments
 (0)