Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The newline-after-import rule requires newline after every import #318

Closed
sindresorhus opened this issue May 8, 2016 · 2 comments · Fixed by #326
Closed

The newline-after-import rule requires newline after every import #318

sindresorhus opened this issue May 8, 2016 · 2 comments · Fixed by #326

Comments

@sindresorhus
Copy link

The following:

'use strict';
var path = require('path');
var arrify = require('arrify');
var pkgConf = require('pkg-conf');
var deepAssign = require('deep-assign');
var objectAssign = require('object-assign');
var homeOrTmp = require('home-or-tmp');
var multimatch = require('multimatch');
var resolveFrom = require('resolve-from');
var pathExists = require('path-exists');

Results in:

  options-manager.js:2:1
  ✖    2:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    3:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    4:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    5:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    6:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    7:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    8:1  Expected empty line after require statement not followed by another require.  import/newline-after-import
  ✖    9:1  Expected empty line after require statement not followed by another require.  import/newline-after-import

With versions 1.7.0.

I expected it to only report about missing newlines after the last import.

@benmosher
Copy link
Member

@singles do you want to take a stab at this?

@singles
Copy link
Contributor

singles commented May 9, 2016

@benmosher Yes, @lo1tuma is already working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants