Releases: strvcom/eslint-config-javascript
6.4.0
6.3.0
6.2.1
Changes
- Adds support for .es file extensions when resolving module paths
6.2.0
New rules
react/jsx-tag-spacing
:warn
(coding-styles/react)react/no-array-index-key
:warn
(react/recommended)react/require-default-props
:error
(react/recommended)no-await-in-loop
:warn
(recommended)
Changed rules
capitalized-comments
: Moved to coding-styles/fixable 🎉
6.1.0
New rulesets
- Ruleset for Node.js v7 has been added
New rules
capitalized-comments
: Optional, warnsrequire-await
: Recommended, warnsno-return-await
: Recommended, warns
Rule changes
func-names
: Relaxed, now requires function names only when no name can be inferred automatically from the codenewline-after-var
: Has been disabled. The rule was enabled due to variable hoisting forvar
statements -vars
should be placed on top of the function and separating these statements from the rest of the code made it better readable. Now that we havelet
andconst
, it's generally better to declare them as needed, then use them right away. Therefore, this rule made such code harder to read.
6.0.1
- Updates
settings
section for theimport
plugin
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!
6.0.0-alpha.2
6.0.0-alpha.1
- EPIC: Includes rules from
eslint-config-import
- Now includes the
eslint-plugin-react
plugin as a dependency - No longer requires class methods to use
this
(this conflicts with React where you are required to implement a set of APIs that React prescribes)
5.3.0
- Require all Symbols to have a description
- Require class methods to use
this
(otherwise suggest making them static)