mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-24 13:01:24 +01:00
merge completed... now to fix all the bugs...
This commit is contained in:
commit
87c4d80fbc
3472 changed files with 466748 additions and 6517 deletions
87
node_modules/eslint-plugin-import/docs/rules/newline-after-import.md
generated
vendored
Normal file
87
node_modules/eslint-plugin-import/docs/rules/newline-after-import.md
generated
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
# import/newline-after-import
|
||||
|
||||
Enforces having one or more empty lines after the last top-level import statement or require call.
|
||||
+(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule has one option, `count` which sets the number of newlines that are enforced after the last top-level import statement or require call. This option defaults to `1`.
|
||||
|
||||
Valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
import { bar } from 'bar-lib'
|
||||
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
```js
|
||||
const FOO = require('./foo')
|
||||
const BAR = require('./bar')
|
||||
|
||||
const BAZ = 1
|
||||
```
|
||||
|
||||
Invalid:
|
||||
|
||||
```js
|
||||
import * as foo from 'foo'
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
```js
|
||||
import * as foo from 'foo'
|
||||
const FOO = 'BAR'
|
||||
|
||||
import { bar } from 'bar-lib'
|
||||
```
|
||||
|
||||
```js
|
||||
const FOO = require('./foo')
|
||||
const BAZ = 1
|
||||
const BAR = require('./bar')
|
||||
```
|
||||
|
||||
With `count` set to `2` this will be considered valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
|
||||
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
With `count` set to `2` these will be considered invalid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
|
||||
## Example options usage
|
||||
```json
|
||||
{
|
||||
"rules": {
|
||||
"import/newline-after-import": ["error", { "count": 2 }]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you like to visually group module imports with its usage, you don't want to use this rule.
|
||||
Loading…
Add table
Add a link
Reference in a new issue