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

no-duplicates breaks some files. #1730

Closed
dora-gt opened this issue Apr 15, 2020 · 4 comments
Closed

no-duplicates breaks some files. #1730

dora-gt opened this issue Apr 15, 2020 · 4 comments

Comments

@dora-gt
Copy link

dora-gt commented Apr 15, 2020

Please refer to this issue: eslint/eslint#13182
Descriptions are there.

declare module '*/office.gql' {
  import { DocumentNode } from 'graphql';
  const defaultDocument: DocumentNode;
  export const AllOffices: DocumentNode;

  export default defaultDocument;
}
    

declare module '*/p-graphql.gql' {
  import { DocumentNode } from 'graphql';
  const defaultDocument: DocumentNode;
  export const HelloMessage: DocumentNode;
export const HelloValue1: DocumentNode;
export const HelloValue2: DocumentNode;
export const HelloValue3: DocumentNode;
export const Hi: DocumentNode;
export const HelloAndHi: DocumentNode;

  export default defaultDocument;
}
@ljharb
Copy link
Member

ljharb commented Apr 17, 2020

Seems like we need to update the rule to treat each declare module in a d.ts file as a separate context.

@JounQin
Copy link
Collaborator

JounQin commented Jul 19, 2022

duplicate of #1479

@JounQin JounQin closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2022
@ljharb
Copy link
Member

ljharb commented Jul 19, 2022

This isn't a duplicate; we need to fix the rule to handle declare module.

@ljharb ljharb reopened this Jul 19, 2022
@JounQin
Copy link
Collaborator

JounQin commented Jul 19, 2022

@ljharb #1479 is about declare module also.

#1479 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants