import-js / import-js/eslint-plugin-import
import/newline-after-import doesn't warn comments
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
This specific code doesn't warn about the need of a new line after import:
```js
import { NamedExport } from 'path/to/module';
/**
* Doc bla bla
*/
const defaultExport = () => ('bla bla');
```
I expect to get a warn about the import not having a new line. Is this behaviour correct? By the way, if I delete the comment the warn appears.
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the JavaScript example with the import/newline-after-import rule, then compare the warning with and without the intervening comment. Trace the rule's handling of comments and add a regression test if the reported behavior is confirmed; done means the rule consistently reports the expected missing newline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100