Skip to content

Commit

Permalink
npm run lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos committed Sep 26, 2024
1 parent d68d4a0 commit 5f7f6b0
Show file tree
Hide file tree
Showing 9 changed files with 14,659 additions and 11,417 deletions.
21 changes: 21 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"settings": {},
"rules": {
"no-unused-vars": "allow",
"no-new-array": "allow",
"no-empty-file": "allow",
"no-document-cookie": "allow",
"no-this-alias": [
"deny",
{
"allow_names": ["self"]
}
],
"no-await-in-loop": "allow",
"react-in-jsx-scope": "allow",
"consistent-function-scoping": "allow",
"no-async-endpoint-handlers": "allow",
"no-new": "allow",
"no-extraneous-class": "allow"
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dev:mjs:http": "pnpm -r --filter @graphql-ez/http dev -- --onSuccess \"cross-env PORT=3004 pnpm -r --filter example-complete-http dev:mjs\"",
"dev:mjs:koa": "pnpm -r --filter @graphql-ez/koa dev -- --onSuccess \"cross-env PORT=3005 pnpm -r --filter example-complete-koa dev:mjs\"",
"dev:next": "pnpm -r --filter @graphql-ez/nextjs dev -- --onSuccess \"pnpm -r --filter example-complete-nextjs dev -- -p 3006\"",
"lint:fix": "oxlint -c=./.oxlintrc.json --tsconfig=./tsconfig.json . -D correctness -D perf -D suspicious --promise-plugin --import-plugin --fix",
"postinstall": "node patch.cjs",
"prepare": "husky install && bob-esbuild tsc && pnpm -r prepack",
"pretty": "prettier --write \"**/*.{ts,tsx,json,yaml,js,cjs,mjs,mdx,md}\"",
Expand Down Expand Up @@ -62,6 +63,7 @@
"husky": "8.0.2",
"jest": "^29.3.1",
"mocha": "^10.2.0",
"oxlint": "^0.9.8",
"prettier": "^3.1.1",
"ts-jest": "^29.0.3",
"typescript": "^5.3.3"
Expand Down
6 changes: 2 additions & 4 deletions packages/client/main/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ async function main() {
}),
]);

await Promise.all([
buildCode({
await buildCode({
entryPoints: ['./src/index.ts', './src/types.ts'],
clean: false,
format: 'interop',
Expand All @@ -50,8 +49,7 @@ async function main() {
rollup: {
interop: 'esModule',
},
}),
]);
});

await tscPromise.then(v => {
if (v.status === 'rejected') throw v.reason;
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/automatic-persisted-queries/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const ezAutomaticPersistedQueries = (options?: AutomaticPersistedQueryOpt
hashAlgorithm = DEFAULT_HASH_ALGORITHM,
disableIf,
} = {
...(options || {}),
...options,
};
const store = _store || createLRUStore();
const getPersistedQuery = _resolvePersistedQuery || (opts => getPersistedQueryFromContext(opts, hashAlgorithm));
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/codegen/src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export async function EnvelopTypeScriptCodegen(executableSchema: GraphQLSchema,
typeof customScalars === 'string'
? customScalars
: {
...(customScalars || {}),
...customScalars,
...(ctx.GraphQLUpload
? {
Upload: 'Promise<import("graphql-upload").FileUpload>',
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/graphiql/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ezGraphiQLIDE = (options: GraphiQLOptions | boolean = true): EZPlug
onRegister(ctx) {
if (!options) return;

const objOptions = { ...(getObjectValue(options) || {}) };
const objOptions = { ...getObjectValue(options) };

const path = (objOptions.path ||= ctx.options.path || '/graphql');

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/graphiql/src/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ezStaticGraphiQLIDE = (options: GraphiQLOptions | boolean = true):
onRegister(ctx) {
if (!options) return;

const objOptions = { ...(getObjectValue(options) || {}) };
const objOptions = { ...getObjectValue(options) };

const path = (objOptions.path ||= ctx.options.path || '/graphql');

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/voyager/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const ezVoyager = (options: VoyagerPluginOptions | boolean = true): EZPlu
onRegister(ctx) {
if (!options) return;

const objOptions = { ...(getObjectValue(options) || {}) };
const objOptions = { ...getObjectValue(options) };

const path = (objOptions.path ||= '/voyager');

Expand Down
26,037 changes: 14,629 additions & 11,408 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 5f7f6b0

Please sign in to comment.