eslint-plugin-import
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -8,2 +8,7 @@ # Change Log | ||
## [1.11.1] - 2016-07-20 | ||
### Fixed | ||
- [`newline-after-import`] exception for `switch` branches with `require`s iff parsed as `sourceType:'module'`. | ||
(still [#441], thanks again [@ljharb]) | ||
## [1.11.0] - 2016-07-17 | ||
@@ -327,3 +332,4 @@ ### Added | ||
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v1.11.0...HEAD | ||
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v1.11.1...HEAD | ||
[1.11.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.11.0...v1.11.1 | ||
[1.11.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.3...v1.11.0 | ||
@@ -330,0 +336,0 @@ [1.10.3]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.2...v1.10.3 |
@@ -11,4 +11,10 @@ 'use strict'; | ||
var _debug = require('debug'); | ||
var _debug2 = _interopRequireDefault(_debug); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var log = (0, _debug2.default)('eslint-plugin-import:rules:newline-after-import'); | ||
//------------------------------------------------------------------------------ | ||
@@ -29,3 +35,4 @@ // Rule Definition | ||
if (scope.block.type === 'SwitchStatement') { | ||
return []; | ||
log('SwitchStatement scopes not supported'); | ||
return null; | ||
} | ||
@@ -102,2 +109,3 @@ | ||
'Program:exit': function ProgramExit() { | ||
log('exit processing for', context.getFilename()); | ||
scopes.forEach(function (_ref) { | ||
@@ -110,6 +118,13 @@ var scope = _ref.scope; | ||
// skip non-array scopes (i.e. arrow function expressions) | ||
if (!(scopeBody instanceof Array)) return; | ||
if (!scopeBody || !(scopeBody instanceof Array)) { | ||
log('invalid scope:', scopeBody); | ||
return; | ||
} | ||
log('got scope:', scopeBody); | ||
requireCalls.forEach(function (node, index) { | ||
var nodePosition = findNodeIndexInScopeBody(scopeBody, node); | ||
log('node position in scope:', nodePosition); | ||
var statementWithRequireCall = scopeBody[nodePosition]; | ||
@@ -132,2 +147,2 @@ var nextStatement = scopeBody[nodePosition + 1]; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25ld2xpbmUtYWZ0ZXItaW1wb3J0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBS0E7Ozs7QUFDQTs7Ozs7Ozs7Ozs7Ozs7O0FBTUEsU0FBUyxtQkFBVCxDQUE2QixTQUE3QixFQUF3QyxTQUF4QyxFQUFtRDtBQUMvQyxTQUFPLFVBQVUsS0FBVixDQUFnQixDQUFoQixLQUFzQixVQUFVLEtBQVYsQ0FBZ0IsQ0FBaEIsQ0FBdEIsSUFBNEMsVUFBVSxLQUFWLENBQWdCLENBQWhCLEtBQXNCLFVBQVUsS0FBVixDQUFnQixDQUFoQixDQUF6RTtBQUNIOztBQUVELFNBQVMsWUFBVCxDQUFzQixLQUF0QixFQUE2QjtBQUN6QixNQUFJLE1BQU0sS0FBTixDQUFZLElBQVosS0FBcUIsaUJBQXpCLEVBQTRDO0FBQzFDLFdBQU8sRUFBUDtBQUNEOztBQUh3QixNQUtqQixJQUxpQixHQUtSLE1BQU0sS0FMRSxDQUtqQixJQUxpQjs7QUFNekIsTUFBSSxRQUFRLEtBQUssSUFBTCxLQUFjLGdCQUExQixFQUE0QztBQUN4QyxXQUFPLEtBQUssSUFBWjtBQUNIOztBQUVELFNBQU8sSUFBUDtBQUNIOztBQUVELFNBQVMsd0JBQVQsQ0FBa0MsSUFBbEMsRUFBd0MsVUFBeEMsRUFBb0Q7QUFDaEQsU0FBTyxzQkFBVSxJQUFWLEVBQWdCLFVBQUMsSUFBRDtBQUFBLFdBQVUsb0JBQW9CLElBQXBCLEVBQTBCLFVBQTFCLENBQVY7QUFBQSxHQUFoQixDQUFQO0FBQ0g7O0FBRUQsU0FBUyxpQkFBVCxDQUEyQixJQUEzQixFQUFp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gICAgICByZXF1aXJlQ2FsbHMuZm9yRWFjaChmdW5jdGlvbiAobm9kZSwgaW5kZXgpIHtcbiAgICAgICAgICBjb25zdCBub2RlUG9zaXRpb24gPSBmaW5kTm9kZUluZGV4SW5TY29wZUJvZHkoc2NvcGVCb2R5LCBub2RlKVxuICAgICAgICAgIGxvZygnbm9kZSBwb3NpdGlvbiBpbiBzY29wZTonLCBub2RlUG9zaXRpb24pXG5cbiAgICAgICAgICBjb25zdCBzdGF0ZW1lbnRXaXRoUmVxdWlyZUNhbGwgPSBzY29wZUJvZHlbbm9kZVBvc2l0aW9uXVxuICAgICAgICAgIGNvbnN0IG5leHRTdGF0ZW1lbnQgPSBzY29wZUJvZHlbbm9kZVBvc2l0aW9uICsgMV1cbiAgICAgICAgICBjb25zdCBuZXh0UmVxdWlyZUNhbGwgPSByZXF1aXJlQ2FsbHNbaW5kZXggKyAxXVxuXG4gICAgICAgICAgaWYgKG5leHRSZXF1aXJlQ2FsbCAmJiBjb250YWluc05vZGVPckVxdWFsKHN0YXRlbWVudFdpdGhSZXF1aXJlQ2FsbCwgbmV4dFJlcXVpcmVDYWxsKSkge1xuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG5leHRTdGF0ZW1lbnQgJiZcbiAgICAgICAgICAgICAoIW5leHRSZXF1aXJlQ2FsbCB8fCAhY29udGFpbnNOb2RlT3JFcXVhbChuZXh0U3RhdGVtZW50LCBuZXh0UmVxdWlyZUNhbGwpKSkge1xuXG4gICAgICAgICAgICBjaGVja0Zvck5ld0xpbmUoc3RhdGVtZW50V2l0aFJlcXVpcmVDYWxsLCBuZXh0U3RhdGVtZW50LCAncmVxdWlyZScpXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgfSlcbiAgICB9LFxuICB9XG59XG4iXX0= |
{ | ||
"name": "eslint-plugin-import", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"description": "Import with sanity.", | ||
@@ -73,2 +73,3 @@ "main": "lib/index.js", | ||
"contains-path": "^0.1.0", | ||
"debug": "^2.2.0", | ||
"doctrine": "1.2.x", | ||
@@ -75,0 +76,0 @@ "es6-map": "^0.1.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
299996
2327
15
+ Addeddebug@^2.2.0