Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint: enable 'import/extensions' rule #273

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ rules:
import/exports-last: off
import/no-duplicates: error
import/no-namespace: error
import/extensions: off # TODO [error, never] # TODO: switch to ignorePackages
import/extensions: [error, never] # TODO: switch to ignorePackages
import/order: [error, { newlines-between: always-and-inside-groups }]
import/newline-after-import: error
import/prefer-default-export: off
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/starWarsConnectionTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai';
import { describe, it } from 'mocha';
import { graphqlSync } from 'graphql';

import { StarWarsSchema } from './starWarsSchema.js';
import { StarWarsSchema } from './starWarsSchema';

describe('Star Wars connections', () => {
it('fetches the first ship of the rebels', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/starWarsMutationTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai';
import { describe, it } from 'mocha';
import { graphqlSync } from 'graphql';

import { StarWarsSchema } from './starWarsSchema.js';
import { StarWarsSchema } from './starWarsSchema';

describe('Star Wars mutations', () => {
it('mutates the data set', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/starWarsObjectIdentificationTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai';
import { describe, it } from 'mocha';
import { graphqlSync } from 'graphql';

import { StarWarsSchema } from './starWarsSchema.js';
import { StarWarsSchema } from './starWarsSchema';

describe('Star Wars object identification', () => {
it('fetches the ID and name of the rebels', () => {
Expand Down
10 changes: 5 additions & 5 deletions src/__tests__/starWarsSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ import {
GraphQLString,
} from 'graphql';

import { nodeDefinitions, globalIdField, fromGlobalId } from '../node/node.js';
import { nodeDefinitions, globalIdField, fromGlobalId } from '../node/node';

import { connectionFromArray } from '../connection/arrayconnection.js';
import { connectionFromArray } from '../connection/arrayconnection';

import {
connectionArgs,
connectionDefinitions,
} from '../connection/connection.js';
} from '../connection/connection';

import { mutationWithClientMutationId } from '../mutation/mutation.js';
import { mutationWithClientMutationId } from '../mutation/mutation';

import {
getFaction,
getShip,
getRebels,
getEmpire,
createShip,
} from './starWarsData.js';
} from './starWarsData';

/**
* This is a basic end-to-end test, designed to demonstrate the various
Expand Down
4 changes: 2 additions & 2 deletions src/connection/__tests__/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import {
graphqlSync,
} from 'graphql';

import { connectionFromArray } from '../arrayconnection.js';
import { connectionFromArray } from '../arrayconnection';

import {
backwardConnectionArgs,
connectionArgs,
connectionDefinitions,
forwardConnectionArgs,
} from '../connection.js';
} from '../connection';

const allUsers = [
{ name: 'Dan', friends: [1, 2, 3, 4] },
Expand Down
2 changes: 1 addition & 1 deletion src/connection/arrayconnection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow strict

import { base64, unbase64 } from '../utils/base64.js';
import { base64, unbase64 } from '../utils/base64';

import type {
Connection,
Expand Down
14 changes: 7 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ export type {
ConnectionCursor,
Edge,
PageInfo,
} from './connection/connectiontypes.js';
} from './connection/connectiontypes';

// Helpers for creating connection types in the schema
export {
backwardConnectionArgs,
connectionArgs,
connectionDefinitions,
forwardConnectionArgs,
} from './connection/connection.js';
} from './connection/connection';

// Helpers for creating connections from arrays
export {
Expand All @@ -27,16 +27,16 @@ export {
cursorToOffset,
getOffsetWithDefault,
offsetToCursor,
} from './connection/arrayconnection.js';
} from './connection/arrayconnection';

// Helper for creating mutations with client mutation IDs
export { mutationWithClientMutationId } from './mutation/mutation.js';
export { mutationWithClientMutationId } from './mutation/mutation';

// Helper for creating node definitions
export { nodeDefinitions } from './node/node.js';
export { nodeDefinitions } from './node/node';

// Helper for creating plural identifying root fields
export { pluralIdentifyingRootField } from './node/plural.js';
export { pluralIdentifyingRootField } from './node/plural';

// Utilities for creating global IDs in systems that don't have them.
export { fromGlobalId, globalIdField, toGlobalId } from './node/node.js';
export { fromGlobalId, globalIdField, toGlobalId } from './node/node';
2 changes: 1 addition & 1 deletion src/node/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {
GraphQLTypeResolver,
} from 'graphql';

import { base64, unbase64 } from '../utils/base64.js';
import { base64, unbase64 } from '../utils/base64';

type GraphQLNodeDefinitions<TContext> = {|
nodeInterface: GraphQLInterfaceType,
Expand Down