Releases: import-js/eslint-plugin-import
custom resolvers!
Resolver plugins: now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.!
correctness
- 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.jsxwas broken when ESLint froze thecontextandsettings. My own fault... not very hygienic to mutate shared state in the first place.
errors abound
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
- Internal parser is now Babylon (6) by default (so generally, you can remove
babel-eslintasimport/parser) - published eslint-config-import with 3 different stock configs
- all rules are off by default; use config package +
import/warningsto 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 + JSXBoth 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-optionssetting allows custom configuration options for Babylon, or whatever parser package you specified withimport/parser
no-require
"Breaking" change: (i.e., tests changed)
no-requireis now enforced on core, npm, and unresolved packages. It is still disabled by default. Thanks, @lightsofapollo!
import 'export' from 'rules'
- added
exportrule to head off theimportproblems at the source - meta: this ES6 validation plugin is now (partially) written in ES6
babel-eslint-plugin-import
• custom parser via import/parser setting (#38)
export default function() { return 'it works!'; }
- fixed issue where
no-reassigncrashed on unnamed default exports (#29)
let [, bugfix] = ['works', 'now']
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-corepackage (#25)
no-named-as-default
- adds rule from #23
- some minor cleaning
- removed
estraversedependency