6.0.0
This release includes many epic improvements and changes. Actually it's so epic that everyone's current configuration will break spectacularly. 🎉
New configuration structure
Each platform now has only two configuration files:
- vXX: A version-specific configuration file with recommended set of rules
- optional: An optional configuration file with some extra rules not considered to have major impact if not followed
The best-practices rulesets have been removed. Many rules' levels have been lowered to warnings and moved into one of the above-mentioned rulesets. Some rules have been completely turned off.
Action needed:
- Check out available rulesets in README for details on and update your .eslintrc.js files.
Fixable coding styles ruleset
There is a new coding style ruleset, @strv/javascript/coding-styles/fixable
. This is ideal for converting existing codebase. You can include this in your configuration and have ESLint automatically fix all issues for you instead of rewriting your code manually.
Plugins are now included with this ruleset
In earlier versions you had to install some ESLint plugins to enable some rules. This is no longer necessary as the plugins are now included with this package.
Actions needed:
- Remove
eslint-plugin-import
andeslint-plugin-react
deps from your package.json files - Remove
plugins
section from your .eslintrc.js configuration files (unless you have other plugins installed)
eslint-plugin-import
is newly incorporated
This plugin provides linting support for ES 2015 modules (but also CommonJS exports). There are simply too many rules to describe what it does, but in general it helps you with verifying that what you import
/export
is really what you expect etc.
Actions needed:
- Verify any errors/issues reported by this plugin and report false positives here. Optionally you might need to provide some extra configuration to make the plugin work, depending on your current setup.
Trailing commas are now required
There has been a proposal (#12) to require trailing commas in many places. The proposal has been accepted. ESLint can autofix this rule to adopt the new coding style.
Actions needed:
- Run
node_modules/.bin/eslint --fix .
in current project to adopt the new coding style
eslint-plugin-react
rules completely revisited
Thanks to @dannytce, the React rules have been reviewed and updated to match best practices in the industry. See #11.
IDE/Editor integration guides 💪
We have some guides and tips for integrating ESLint in your favourite editors/IDEs. Check them out!