Releases: strvcom/eslint-config-javascript
9.2.0
Fixes
- Fix development-only scripts preventing this project from being installed directly from Github
Changes
- Replace the now-deprecated
typescript-eslint-parser
with@typescript-eslint/parser
(thanks @honzahovorka 🍻)
9.1.0
Changes
- (mocha) When using the
mocha
environment preset,max-nested-callbacks
now allows up to 6 nested callbacks - (react) The
react/forbid-dom-props
is now enabled and prevents you from using plain DOM nodes with eitherid
orstyle
props (React components are not affected by this rule)
9.0.0
This major upgrade brings all the bundled plugins up to date with new rules and updated configuration, so we can all enjoy even more thorough code checks on our projects! 🎨
Also, the node
environment preset now includes eslint-plugin-node
for enhanced Node.js-related code analysis, like unsupported syntax/builtins/globals on specific Node.js runtimes or warnings on deprecated API usage.
Breaking changes
- Some rules, especially from the
eslint-plugin-mocha
plugin have been increased fromwarn
toerror
level - Upgraded
eslint-plugin-react
to latest and greatest version and added some new rules witherror
level - Upgraded
eslint-plugin-flowtype
to latest greatest version which contained some breaking parsing changes - Added
eslint-plugin-node
plugin to thenode
environment preset 🎉 💪
Upgrading
Easy way
npm i -D eslint@latest @strv/eslint-plugin-javascript@latest
Hard way
In case the above does not work (you get errors about unknown rules being used or "cannot find module x") you might have to drop the whole ruleset from your project first:
npm remove eslint @strv/eslint-config-javascript
rm -rf node_modules
npm i && npm i -D eslint@latest @strv/eslint-plugin-javascript@latest
8.3.1
Fixes
- The
typescript
ruleset did not include configuration for theimport/resolver
, causing theimport/no-unresolved
rule to not properly work because it would ignore .ts and .d.ts files
8.3.0
New rulesets
TypeScript ruleset is now available! 🎉 Still somewhat experimental - please report any issues or false-positives that you find in your code.
Rule changes
id-length
: Now allows up to 30 characters max (up from 25) and allows the following single-character identifiers:i
(index),R
(Ramda 😍),_
(lodash 💩),$
(jQuery & family 🤮)
8.2.0
New environments
@strv/javascript/environments/mocha/recommended
environment has been added for Mocha test files 🎨
See the configuration file linked above for details about which rules have been enabled. All rules will only report warning
so adding this ruleset will not break your CI pipeline.
⚠️ Some rules from this ruleset will be bumped toerror
level on the next semver-major release of this package.
8.1.0
Rule changes
- d8b96fd - feat(rule): add require-unicode-regexp (warn)
- 2bb65c2 - feat(rule): add require-atomic-updates (warn)
- 6b2aabd - feat(rule): add no-misleading-character-class (error)
- 20155f1 - feat(rule): add no-async-promise-executor (warn)
- 91ad0fa - feat(rule): make no-shadow more strict
- 069079a - feat(rule): no-catch-shadow has been deprecated
8.0.1
Fixes
- Re-enable
es6
environment to avoid errors likePromise/Map/Set is not defined
etc.I thought this was automatically enabled by setting
ecmaVersion: 2015
or higher but it turns out it is not. 🤷♂️
8.0.0
Breaking changes
- now requires ESLint 5
- environments/nodejs/v7 ruleset has been removed
- The default ruleset has been changed from environments/nodejs/v6 to v10
- Custom extensions from
import/extensions
have been removed as the rule now automatically supports .js, .mjs and .jsx files
New rules
- max-lines-per-function (torment)
- prefer-object-spread (fixable)
- max-classes-per-file (shared/recommended)
- array-element-newline (fixable)
Rule changes
- valid-jsdoc now requires parameter type annotations
Contributors
7.8.0
New rulesets
- Added react v16 ruleset! 🎉 Probably nothing will change at the moment but it opens up an upgrade path in the future and brings consistency to all projects using React 16 and linting with the react/v15 ruleset. (d48b56a)
Changes / fixes
- Now requires ESLint 4.9 - you may need to drop your node_modules folder and reinstall all deps again if you are getting weird errors 🤔
- Support test files in any level of nested test/ directory (9c09a01)
comma-dangle
is now enforced for multiline function parameters (cffa40d)- (flow) Return types are not needed if they can be inferred (05b0539)
- (react): Properly set
ecmaVersion
to2017
in react ruleset (#25 🍻 @petrhanak) - (react): Warn on
console.log()
usage (#26 🍻 @petrhanak)