gajus / gajus/eslint-plugin-flowtype

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

Open
#460 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.1k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

ESLint [documentation on `camelcase`](https://eslint.org/docs/rules/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.

```ts
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(graphql` ... `);

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

return

{post.message}

}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.