Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Oct 30, 2024
1 parent b02454b commit ca179e6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
'no-dupe-class-members': 'off',
'dot-notation': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-empty-object-type': "off",
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-namespace': 'off',
Expand Down
1 change: 1 addition & 0 deletions packages/graphql-tag-pluck/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-require-imports */
import { Source } from 'graphql';
import { parse } from '@babel/parser';
import traversePkg from '@babel/traverse';
Expand Down
1 change: 1 addition & 0 deletions packages/loaders/code-file/src/load-from-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function tryToLoadFromExportSync(rawFilePath: string): GraphQLSchema | Do
try {
const filepath = ensureFilepath(rawFilePath);

// eslint-disable-next-line @typescript-eslint/no-require-imports
const mod = require(filepath);

return pickExportFromModuleSync({ module: mod, filepath });
Expand Down
1 change: 1 addition & 0 deletions packages/loaders/module/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class ModuleLoader implements Loader {
private importModuleSync(pointer: string) {
const { modulePath, exportName } = extractData(pointer);

// eslint-disable-next-line @typescript-eslint/no-require-imports
const imported = require(modulePath);

return this.extractFromModule(imported, modulePath, exportName);
Expand Down
1 change: 1 addition & 0 deletions packages/loaders/url/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type AsyncImportFn = (moduleName: string) => PromiseLike<any>;
export type SyncImportFn = (moduleName: string) => any;

const asyncImport: AsyncImportFn = (moduleName: string) => import(`${moduleName}`);
// eslint-disable-next-line @typescript-eslint/no-require-imports
const syncImport: SyncImportFn = (moduleName: string) => require(`${moduleName}`);

type HeadersConfig = Record<string, string>;
Expand Down
3 changes: 1 addition & 2 deletions packages/mock/src/MockStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,7 @@ export class MockStore implements IMockStore {
for (const otherFieldName in values) {
if (otherFieldName === fieldName) continue;
if (typeof (values as any)[otherFieldName] === 'function') continue;
onOtherFieldsGenerated &&
onOtherFieldsGenerated(otherFieldName, (values as any)[otherFieldName]);
onOtherFieldsGenerated?.(otherFieldName, (values as any)[otherFieldName]);
}

value = (values as any)[fieldName];
Expand Down

0 comments on commit ca179e6

Please sign in to comment.