Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.

fix lint

Changed files
+5 -19
alias
scripts
+2 -8
alias/language/printLocation.mjs
···
import { getLocation } from 'graphql/language/location';
export function printLocation(location) {
-
return printSourceLocation(
-
location.source,
-
getLocation(location.source, location.start)
-
);
+
return printSourceLocation(location.source, getLocation(location.source, location.start));
}
export function printSourceLocation(source, sourceLocation) {
const firstLineColumnOffset = source.locationOffset.column - 1;
const lineNum = sourceLocation.line + source.locationOffset.line - 1;
-
const columnNum =
-
sourceLocation.column + sourceLocation.line === 1
-
? firstLineColumnOffset
-
: 0;
+
const columnNum = sourceLocation.column + sourceLocation.line === 1 ? firstLineColumnOffset : 0;
return `${source.name}:${lineNum}:${columnNum}`;
}
+1 -5
alias/language/visitor.mjs
···
-
export {
-
getEnterLeaveForKind,
-
getVisitFn,
-
visitInParallel,
-
} from 'graphql/language/visitor';
+
export { getEnterLeaveForKind, getVisitFn, visitInParallel } from 'graphql/language/visitor';
export { BREAK, visit } from '@0no-co/graphql.web';
+1 -2
scripts/babel/transformDevAssert.mjs
···
p.parentPath.parentPath.node.body.length === 1 &&
p.parentPath.parentPath.node.body[0] === path.parentPath.node &&
t.isIfStatement(p.parentPath.parentPath.parentPath.node) &&
-
p.parentPath.parentPath.parentPath.node.consequent ===
-
p.parentPath.parentPath.node &&
+
p.parentPath.parentPath.parentPath.node.consequent === p.parentPath.parentPath.node &&
!p.parentPath.parentPath.node.alternate
) {
p = p.parentPath.parentPath.parentPath;
+1 -4
scripts/prepare.js
···
const path = require('path');
const fs = require('fs');
-
const hookSource = path.resolve(
-
__dirname,
-
'../node_modules/husky-v4/sh/husky.sh'
-
);
+
const hookSource = path.resolve(__dirname, '../node_modules/husky-v4/sh/husky.sh');
const hook = path.resolve(__dirname, '../.git/hooks/husky.sh');
const localHook = path.resolve(__dirname, '../.git/hooks/husky.local.sh');
const gitConfig = path.resolve(__dirname, '../.git/config');