import-js / import-js/eslint-plugin-import

Rule proposal: no-empty-line-separating-import

Open
#172 14 comments 28 reactions 0 assignees View on GitHub
accepted rule proposal style-guide
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

This is stylistic rule. I often see import statements separated one from another using arbitrary rules, e.g.

``` js
import yargs from 'yargs';
import getStdin from 'get-stdin';

import {
lintFiles,
lintText
} from './../../utilities';

import {
failHandler,
getTargetPaths,
outputReport
} from './../../utilities/bin';
```

This rule would enforce no spacing between import statements, i.e.

``` js
import yargs from 'yargs';
import getStdin from 'get-stdin';
import {
lintFiles,
lintText
} from './../../utilities';
import {
failHandler,
getTargetPaths,
outputReport
} from './../../utilities/bin';
```

Contributor guide

Open the contributing guide

Research direction

The issue names no file or test path. Start by locating existing rule implementations and their tests in this JavaScript ESLint plugin; done means consecutive import statements no longer allow arbitrary blank-line separation, matching the compact example.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.