Change Log
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. This change log adheres to standards from Keep a CHANGELOG.
Unreleased
[2.14.0] - 2018-08-13
- 69e0187 (HEAD -> master, source/master, origin/master, origin/HEAD) Merge pull request #1151 from jf248/jsx
|\
| * e30a757 (source/pr/1151, fork/jsx) Add JSX check to namespace rule |/ - 8252344 (source/pr/1148) Add error to output when module loaded as resolver has invalid API ### Added
- <code>no-useless-path-segments</code>: add commonJS (CJS) support (#1128, thanks @1pete)
- <code>namespace</code>: add JSX check (#1151, thanks @jf248)
Fixed
- <code>no-cycle</code>: ignore Flow imports (#1126, thanks @gajus)
- fix Flow type imports (#1106, thanks @syymza)
- [
no-relative-parent-imports
]: resolve paths (#1135, thanks @chrislloyd) - [
import/order
]: fix autofixer when using typescript-eslint-parser (#1137, thanks @justinanastos) - repeat fix from #797 for #717, in another place (thanks @ljharb)
Refactors
- add explicit support for RestElement alongside ExperimentalRestProperty (thanks @ljharb)
2.13.0 - 2018-06-24
Added
- Add ESLint 5 support (#1122, thanks @ai and @ljharb)
- Add [
no-relative-parent-imports
] rule: disallow relative imports from parent directories (#1093, thanks @chrislloyd)
Fixed
namespace
rule: ensure it works in eslint 5/ecmaVersion 2018 (thanks @ljharb)
2.12.0 - 2018-05-17
Added
- Ignore type imports for <code>named</code> rule (#931, thanks @mattijsbliek)
- Add documentation for <code>no-useless-path-segments</code> rule (#1068, thanks @manovotny)
packageDir
option for <code>no-extraneous-dependencies</code> can be array-valued (#1085, thanks @hulkish)
2.11.0 - 2018-04-09
Added
- Fixer for <code>first</code>
allow-require
option for <code>no-commonjs</code> rule (#880, thanks @futpib)
Fixed
- memory/CPU regression where ASTs were held in memory (#1058, thanks @klimashkin/@lukeapage)
2.10.0 - 2018-03-29
Added
- Autofixer for <code>order</code> rule (#908, thanks @tihonove)
- Add <code>no-cycle</code> rule: reports import cycles.
2.9.0 - 2018-02-21
Added
- Add <code>group-exports</code> rule: style-guide rule to report use of multiple named exports (#721, thanks @robertrossmann)
- Add <code>no-self-import</code> rule: forbids a module from importing itself. (#727, #449, #447, thanks @giodamelio).
- Add <code>no-default-export</code> rule (#889, thanks @isiahmeadows)
- Add <code>no-useless-path-segments</code> rule (#912, thanks @graingert and @danny-andrews)
- ... and more! check the commits for v2.9.0
2.8.0 - 2017-10-18
Added
- <code>exports-last</code> rule (#620 + #632, thanks @k15a)
Changed
Fixed
- support scoped modules containing hyphens (#744, thanks @rosswarren)
- core-modules now resolves files inside declared modules (#886 / #891, thanks @mplewis)
- TypeError for missing AST fields from TypeScript (#842 / #944, thanks @alexgorbatchev)
2.7.0 - 2017-07-06
Changed
- <code>no-absolute-path</code> picks up speed boost, optional AMD support (#843, thanks @jseminck)
2.6.1 - 2017-06-29
Fixed
- update bundled node resolver dependency to latest version
2.6.0 - 2017-06-23
Changed
- update tests / peerDeps for ESLint 4.0 compatibility (#871, thanks @mastilver)
- <code>memo-parser</code> updated to require
filePath
on parser options as it melts down if it's not there, now that this plugin always provides it. (see #863)
2.5.0 - 2017-06-22
Re-releasing v2.4.0 after discovering that the memory leak is isolated to the <code>memo-parser</code>, which is more or less experimental anyway.
Added
2.4.0 - 2017-06-02 [YANKED]
Yanked due to critical issue in eslint-module-utils with cache key resulting from #839.
Added
- Add
filePath
intoparserOptions
passed toparser
(#839, thanks @sompylasar) - Add
allow
option to <code>no-unassigned-import</code> to allow for files that match the globs (#671, #737, thanks @kevin940726).
2.3.0 - 2017-05-18
Added
- <code>no-anonymous-default-export</code> rule: report anonymous default exports (#712, thanks @duncanbeevers).
- Add new value to <code>order</code>'s
newlines-between
option to allow newlines inside import groups (#627, #628, thanks @giodamelio) - Add
count
option to the <code>newline-after-import</code> rule to allow configuration of number of newlines expected (#742, thanks @ntdb)
Changed
- <code>no-extraneous-dependencies</code>: use
read-pkg-up
to simplify finding + loadingpackage.json
(#680, thanks @wtgtybhertgeghgtwtg) - Add support to specify the package.json <code>no-extraneous-dependencies</code>
Fixed
- attempt to fix crash in <code>no-mutable-exports</code>. (#660)
- "default is a reserved keyword" in no-maned-default tests by locking down babylon to 6.15.0 (#756, thanks @gmathieu)
- support scoped modules containing non word characters
2.2.0 - 2016-11-07
Fixed
- Corrected a few gaffs in the auto-ignore logic to fix major performance issues
with projects that did not explicitly ignore
node_modules
. (#654) - <code>import/ignore</code> setting was only being respected if the ignored module didn't start with
an
import
orexport
JS statement - <code>prefer-default-export</code>: fixed crash on export extensions (#653)
2.1.0 - 2016-11-02
Added
- Add <code>no-named-default</code> rule: style-guide rule to report use of unnecessarily named default imports (#596, thanks @ntdb)
- <code>no-extraneous-dependencies</code>: check globs against CWD + absolute path (#602 + #630, thanks @ljharb)
Fixed
- <code>prefer-default-export</code> handles flow
export type
(#484 + #639, thanks @jakubsta) - <code>prefer-default-export</code> handles re-exported default exports (#609)
- Fix crash when using <code>newline-after-import</code> with decorators (#592)
- Properly report <code>newline-after-import</code> when next line is a decorator
- Fixed documentation for the default values for the <code>order</code> rule (#601)
2.0.1 - 2016-10-06
Fixed
- Fixed code that relied on removed dependencies. (#604)
2.0.0! - 2016-09-30
Added
- <code>unambiguous</code> rule: report modules that are not unambiguously ES modules.
recommended
shared config. Roughlyerrors
andwarnings
mixed together, with someparserOptions
in the mix. (#402)react
shared config: addedjsx: true
toparserOptions.ecmaFeatures
.- Added <code>no-webpack-loader-syntax</code> rule: forbid custom Webpack loader syntax in imports. (#586, thanks @fson!)
- Add option
newlines-between: "ignore"
to <code>order</code> - Added <code>no-unassigned-import</code> rule (#529)
Breaking
- <code>import/extensions</code> setting defaults to
['.js']
. (#306) - <code>import/ignore</code> setting defaults to nothing, and ambiguous modules are ignored natively. This means importing from CommonJS modules will no longer be reported by <code>default</code>, <code>named</code>, or <code>namespace</code>, regardless of
import/ignore
. (#270) - <code>newline-after-import</code>: Removed need for an empty line after an inline
require
call (#570) - <code>order</code>: Default value for
newlines-between
option is nowignore
(#519)
Changed
imports-first
is renamed to <code>first</code>.imports-first
alias will continue to exist, but may be removed in a future major release.- Case-sensitivity: now specifically (and optionally) reported by <code>no-unresolved</code>. Other rules will ignore case-mismatches on paths on case-insensitive filesystems. (#311)
Fixed
- <code>no-internal-modules</code>: support
@
-scoped packages (#577+#578, thanks @spalger)
1.16.0 - 2016-09-22
Added
- Added <code>no-dynamic-require</code> rule: forbid
require()
calls with expressions. (#567, #568) - Added <code>no-internal-modules</code> rule: restrict deep package imports to specific folders. (#485, thanks @spalger!)
- <code>extensions</code>: allow override of a chosen default with options object (#555, thanks @ljharb!)
Fixed
- <code>no-named-as-default</code> no longer false-positives on
export default from '...'
(#566, thanks @preco21) - <code>default</code>: allow re-export of values from ignored files as default (#545, thanks @skyrpex)
1.15.0 - 2016-09-12
Added
- Added an
allow
option to <code>no-nodejs-modules</code> to allow exceptions (#452, #509). - Added <code>no-absolute-path</code> rule (#530, #538)
- <code>max-dependencies</code> for specifying the maximum number of dependencies (both
import
andrequire
) a module can have. (see #489, thanks @tizmagik) - Added glob option to config for <code>no-extraneous-dependencies</code>, after much bikeshedding. Thanks, @knpwrs! (#527)
Fixed
- <code>no-named-as-default-member</code> Allow default import to have a property named "default" (#507, #508, thanks @jquense for both!)
1.14.0 - 2016-08-22
Added
- <code>import/parsers</code> setting: parse some dependencies (i.e. TypeScript!) with a different parser than the ESLint-configured parser. (#503)
Fixed
- <code>namespace</code> exception for get property from
namespace
import, which are re-export from commonjs module (#499 fixes #416, thanks @wKich)
1.13.0 - 2016-08-11
Added
allowComputed
option for <code>namespace</code> rule. If set totrue
, won't report computed member references to namespaces. (see #456)
Changed
- Modified <code>no-nodejs-modules</code> error message to include the module's name (#453, #461)
Fixed
- <code>import/extensions</code> setting is respected in spite of the appearance of imports in an imported file. (fixes #478, thanks @rhys-vdw)
1.12.0 - 2016-07-26
Added
- <code>import/external-module-folders</code> setting: a possibility to configure folders for "external" modules (#444, thanks @zloirock)
1.11.1 - 2016-07-20
Fixed
- <code>newline-after-import</code> exception for
switch
branches withrequire
s iff parsed assourceType:'module'
. (still #441, thanks again @ljharb)
1.11.0 - 2016-07-17
Added
- Added an
peerDependencies
option to <code>no-extraneous-dependencies</code> to allow/forbid peer dependencies (#423, #428, thanks @jfmengels!).
Fixed
- <code>newline-after-import</code> exception for multiple
require
s in an arrow function expression (e.g.() => require('a') || require('b')
). (#441, thanks @ljharb)
1.10.3 - 2016-07-08
Fixed
- removing
Symbol
dependencies (i.e.for-of
loops) due to Node 0.10 polyfill issue (see #415). Should not make any discernible semantic difference.
1.10.2 - 2016-07-04
Fixed
- Something horrible happened during
npm prepublish
of 1.10.1. Severalrm -rf node_modules && npm i
andgulp clean && npm prepublish
s later, it is rebuilt and republished as 1.10.2. Thanks @rhettlivingston for noticing and reporting!
1.10.1 - 2016-07-02 [YANKED]
Added
- Officially support ESLint 3.x. (peerDependencies updated to
2.x - 3.x
)
1.10.0 - 2016-06-30
Added
- Added new rule <code>no-restricted-paths</code>. (#155/#371, thanks @lo1tuma)
- <code>import/core-modules</code> setting: allow configuration of additional module names,
to be treated as builtin modules (a la
path
, etc. in Node). (#275 + #365, thanks @sindresorhus for driving) - React Native shared config (based on comment from #283)
Fixed
- Fixed crash with
newline-after-import
related to the use of switch cases. (fixes #386, thanks @ljharb for reporting) (#395)
1.9.2 - 2016-06-21
Fixed
- Issues with ignored/CJS files in <code>export</code> and <code>no-deprecated</code> rules. (#348, #370)
1.9.1 - 2016-06-16
Fixed
- Reordered precedence for loading resolvers. (#373)
1.9.0 - 2016-06-10
Added
- Added support TomDoc comments to <code>no-deprecated</code>. (#321, thanks @josh)
- Added support for loading custom resolvers (#314, thanks @le0nik)
Fixed
- <code>prefer-default-export</code> handles
export function
andexport const
in same file (#359, thanks @scottnonnenberg)
1.8.1 - 2016-05-23
Fixed
export * from 'foo'
now properly ignores adefault
export fromfoo
, if any. (#328/#332, thanks @jkimbo) This impacts all static analysis of imported names. (<code>default</code>, <code>named</code>, <code>namespace</code>, <code>export</code>)- Make <code>order</code>'s
newline-between
option handle multiline import statements (#313, thanks @singles) - Make <code>order</code>'s
newline-between
option handle not assigned import statements (#313, thanks @singles) - Make <code>order</code>'s
newline-between
option ignorerequire
statements inside object literals (#313, thanks @singles) - <code>prefer-default-export</code> properly handles deep destructuring,
export * from ...
, and files with no exports. (#342+#343, thanks @scottnonnenberg)
1.8.0 - 2016-05-11
Added
- <code>prefer-default-export</code>, new rule. (#308, thanks @gavriguy)
Fixed
- Ignore namespace / ES7 re-exports in <code>no-mutable-exports</code>. (#317, fixed by #322. thanks @borisyankov + @jfmengels)
- Make <code>no-extraneous-dependencies</code> handle scoped packages (#316, thanks @jfmengels)
1.7.0 - 2016-05-06
Added
- <code>newline-after-import</code>, new rule. (#245, thanks @singles)
- Added an
optionalDependencies
option to <code>no-extraneous-dependencies</code> to allow/forbid optional dependencies (#266, thanks @jfmengels). - Added
newlines-between
option to <code>order</code> rule (#298, thanks @singles) - add <code>no-mutable-exports</code> rule (#290, thanks @josh)
- <code>import/extensions</code> setting: a list of file extensions to parse as modules
and search for
export
s. If unspecified, all extensions are considered valid (for now). In v2, this will likely default to['.js', MODULE_EXT]
. (#297, to fix #267)
Fixed
- <code>extensions</code>: fallback to source path for extension enforcement if imported
module is not resolved. Also, never report for builtins (i.e.
path
). (#296)
1.6.1 - 2016-04-28
Fixed
- <code>no-named-as-default-member</code>: don't crash on rest props. (#281, thanks @SimenB)
- support for Node 6: don't pass
null
topath
functions. Thanks to @strawbrary for bringing this up (#272) and adding OSX support to the Travis config (#288).
1.6.0 - 2016-04-25
Added
- add <code>no-named-as-default-member</code> to
warnings
canned config - add <code>no-extraneous-dependencies</code> rule (#241, thanks @jfmengels)
- add <code>extensions</code> rule (#250, thanks @lo1tuma)
- add <code>no-nodejs-modules</code> rule (#261, thanks @jfmengels)
- add <code>order</code> rule (#247, thanks @jfmengels)
- consider
resolve.fallback
config option in the webpack resolver (#254)
Changed
- <code>imports-first</code> now allows directives (i.e.
'use strict'
) strictly before any imports (#256, thanks @lemonmade)
Fixed
- <code>named</code> now properly ignores the source module if a name is re-exported from
an ignored file (i.e.
node_modules
). Also improved the reported error. (thanks to @jimbolla for reporting) - <code>no-named-as-default-member</code> had a crash on destructuring in loops (thanks for heads up from @lemonmade)
1.5.0 - 2016-04-18
Added
- report resolver errors at the top of the linted file
- add <code>no-namespace</code> rule (#239, thanks @singles)
- add <code>no-named-as-default-member</code> rule (#243, thanks @dmnd)
Changed
- Rearranged rule groups in README in preparation for more style guide rules
Removed
- support for Node 0.10, via
es6-*
ponyfills. Using native Map/Set/Symbol.
1.4.0 - 2016-03-25
Added
- Resolver plugin interface v2: more explicit response format that more clearly covers the found-but-core-module case, where there is no path. Still backwards-compatible with the original version of the resolver spec.
- Resolver documentation
Changed
- using
package.json/files
instead of.npmignore
for package file inclusion (#228, thanks @mathieudutour) - using
es6-*
ponyfills instead ofbabel-runtime
1.3.0 - 2016-03-20
Major perf improvements. Between parsing only once and ignoring gigantic, non-module node_modules
,
there is very little added time.
My test project takes 17s to lint completely, down from 55s, when using the
memoizing parser, and takes only 27s with naked babel-eslint
(thus, reparsing local modules).
Added
Fixed
- Huge reduction in execution time by only ignoring <code>import/ignore</code> setting if
something that looks like an
export
is detected in the module content.
1.2.0 - 2016-03-19
Thanks @lencioni for identifying a huge amount of rework in resolve and kicking off a bunch of memoization.
I'm seeing 62% improvement over my normal test codebase when executing only <code>no-unresolved</code> in isolation, and ~35% total reduction in lint time.
Changed
- added caching to core/resolve via #214, configured via <code>import/cache</code> setting
1.1.0 - 2016-03-15
Added
- Added an <code>ignore</code> option to <code>no-unresolved</code> for those pesky files that no resolver can find. (still prefer enhancing the Webpack and Node resolvers to using it, though). See #89 for details.
1.0.4 - 2016-03-11
Changed
- respect hoisting for deep namespaces (<code>namespace</code>/<code>no-deprecated</code>) (#211)
Fixed
1.0.3 - 2016-02-26
Changed
- no-deprecated follows deep namespaces (#191)
Fixed
- <code>namespace</code> no longer flags modules with only a default export as having no names. (ns.default is valid ES6)
1.0.2 - 2016-02-26
Fixed
- don't parse imports with no specifiers (#192)
1.0.1 - 2016-02-25
Fixed
- export
stage-0
shared config - documented <code>no-deprecated</code>
- deep namespaces are traversed regardless of how they get imported (#189)
1.0.0 - 2016-02-24
Added
- <code>no-deprecated</code>: WIP rule to let you know at lint time if you're using deprecated functions, constants, classes, or modules.
Changed
- <code>namespace</code>: support deep namespaces (#119 via #157)
1.0.0-beta.0 - 2016-02-13
Changed
- support for (only) ESLint 2.x
- no longer needs/refers to
import/parser
orimport/parse-options
. Instead, ESLint provides the configured parser + options to the rules, and they use that to parse dependencies.
Removed
babylon
as default import parser (see Breaking)
0.13.0 - 2016-02-08
Added
- <code>no-commonjs</code> rule
- <code>no-amd</code> rule
Removed
- Removed vestigial
no-require
rule. <code>no-commonjs</code> is more complete.
0.12.2 - 2016-02-06 [YANKED]
Unpublished from npm and re-released as 0.13.0. See #170.
0.12.1 - 2015-12-17
Changed
- Broke docs for rules out into individual files.
0.12.0 - 2015-12-14
Changed
- Ignore <code>import/ignore</code> setting if exports are actually found in the parsed module. Does
this to support use of
jsnext:main
innode_modules
without the pain of managing an allow list or a nuanced deny list.
0.11.0 - 2015-11-27
Added
- Resolver plugins. Now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.!
Earlier releases (0.10.1 and younger)
See GitHub release notes for info on changes for earlier releases.