Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 663 Bytes

newline-after-import.md

File metadata and controls

40 lines (26 loc) · 663 Bytes

newline-after-import

Reports if there's no new line after last import/require in group.

Rule Details

NOTE: In each of those examples you can replace import call with require.

Valid:

import defaultExport from './foo'

const FOO = 'BAR'
import defaultExport from './foo'
import { bar }  from 'bar-lib'

const FOO = 'BAR'

...whereas here imports will be reported:

import * as foo from 'foo'
const FOO = 'BAR'
import * as foo from 'foo'
const FOO = 'BAR'

import { bar }  from 'bar-lib'

When Not To Use It

If you like to visually group module imports with its usage, you don't want to use this rule.