Skip to content

Releases: import-js/eslint-plugin-import

correctness

25 Nov 22:03
Compare
Choose a tag to compare
  • cache correctness: should properly re-load changed files even in a long lived process (like a webpack dev server)
  • fixed issue where inferring JSX parsing from ecmaFeatures.jsx was broken when ESLint froze the context and settings. My own fault... not very hygienic to mutate shared state in the first place.

errors abound

15 Nov 00:51
Compare
Choose a tag to compare

Breaking: removed no-errors rule. Instead, each individual rule will report parse errors in the target imported file, if encountered.

#90: Added {commonjs: [bool], amd: [bool]} option object to no-unresolved. If set true, will attempt to resolve module paths for CommonJS require and AMD define + require in a limited set of cases. Not nearly so smart as Webpack, but smart enough to be useful. (hopefully.) Thanks @mctep for changing my mind on this. 😁

#94: Dependency parser will infer 'jsx' plugin if using default Babylon and jsx is asserted in the ecmaFeatures. Thanks @jameslnewell for bringing this up.

#88: un-smarted no-require. It will now report on all require statements, everywhere, regardless of target.

rise of Babylon

05 Nov 14:15
Compare
Choose a tag to compare
  • Internal parser is now Babylon (6) by default (so generally, you can remove babel-eslint as import/parser)
  • published eslint-config-import with 3 different stock configs
  • all rules are off by default; use config package + import/warnings to get previous defaults:
---
extends:
- 'eslint:recommended' # or your favorite base config
- import/warnings  # or just `import` if you want only the basics
- import/es7-jsx  # will configure the parser for stage 1 ES7 syntax + JSX

Both import/warnings and import/es7-jsx extend the base import config, so you only need to mention it explicitly if you want only the basic config. All 3 will set plugins: - import for you, too.

  • import/parse-options setting allows custom configuration options for Babylon, or whatever parser package you specified with import/parser

no-require

09 Oct 17:42
Compare
Choose a tag to compare

"Breaking" change: (i.e., tests changed)

  • no-require is now enforced on core, npm, and unresolved packages. It is still disabled by default. Thanks, @lightsofapollo!

import 'export' from 'rules'

15 Nov 00:44
Compare
Choose a tag to compare
  • added export rule to head off the import problems at the source
  • meta: this ES6 validation plugin is now (partially) written in ES6

babel-eslint-plugin-import

17 Jul 02:08
Compare
Choose a tag to compare

• custom parser via import/parser setting (#38)

export default function() { return 'it works!'; }

05 Jun 12:24
Compare
Choose a tag to compare
  • fixed issue where no-reassign crashed on unnamed default exports (#29)

let [, bugfix] = ['works', 'now']

24 Apr 11:24
Compare
Choose a tag to compare
  • no-reassign: fixed a crash for array destructuring with omitted positions (i.e. let [/*missing*/, present] = [4, 2])
  • linted everything to a (more) consistent code style
  • pulled out traversal/file resolution to eslint-import-core package (#25)

no-named-as-default

15 Apr 11:05
Compare
Choose a tag to compare
  • adds rule from #23
  • some minor cleaning
  • removed estraverse dependency

no-require

09 Apr 11:36
Compare
Choose a tag to compare
  • no-require rule.
  • Package tests to prevent rules from being forgotten from index.