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-parserwith@typescript-eslint/parser(thanks @honzahovorka 🍻)
9.1.0
Changes
- (mocha) When using the
mochaenvironment preset,max-nested-callbacksnow allows up to 6 nested callbacks - (react) The
react/forbid-dom-propsis now enabled and prevents you from using plain DOM nodes with eitheridorstyleprops (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-mochaplugin have been increased fromwarntoerrorlevel - Upgraded
eslint-plugin-reactto latest and greatest version and added some new rules witherrorlevel - Upgraded
eslint-plugin-flowtypeto latest greatest version which contained some breaking parsing changes - Added
eslint-plugin-nodeplugin to thenodeenvironment 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
typescriptruleset did not include configuration for theimport/resolver, causing theimport/no-unresolvedrule 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 toerrorlevel 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
es6environment to avoid errors likePromise/Map/Set is not definedetc.I thought this was automatically enabled by setting
ecmaVersion: 2015or 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/extensionshave 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-dangleis now enforced for multiline function parameters (cffa40d)- (flow) Return types are not needed if they can be inferred (05b0539)
- (react): Properly set
ecmaVersionto2017in react ruleset (#25 🍻 @petrhanak) - (react): Warn on
console.log()usage (#26 🍻 @petrhanak)