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

"camelcase" should ignore generic arguments like it ignores function arguments #460

Open
AlicanC opened this issue Feb 5, 2021 · 0 comments

Comments

@AlicanC
Copy link

AlicanC commented Feb 5, 2021

ESLint documentation on camelcase states:

"ignoreImports": true does not check ES2015 imports (but still checks any use of the imports later in the code except function arguments)

I think the "except function arguments" part should also apply to generic arguments.

import { type PostView_post } from './__generated__/PostView_post.graphql';
import { some_data } from './data';

function MyComponent(props) {
  // PostView_post causes an error and I'm suggesting it shouldn't
  const post = useFragment<PostView_post>(graphql` ... `);

  // some_data does not cause an error as expected
  console.log(some_data);

  return <div>{post.message}</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant