Eslint Config Javascript Versions Save

Write bulletproof JavaScript like a pro! 😎

9.2.0

5 years ago

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

5 years ago

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 either id or style props (React components are not affected by this rule)

9.0.0

5 years ago

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 from warn to error level
  • Upgraded eslint-plugin-react to latest and greatest version and added some new rules with error level
  • Upgraded eslint-plugin-flowtype to latest greatest version which contained some breaking parsing changes
  • Added eslint-plugin-node plugin to the node 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

5 years ago

Fixes

  • The typescript ruleset did not include configuration for the import/resolver, causing the import/no-unresolved rule to not properly work because it would ignore .ts and .d.ts files

8.3.0

5 years ago

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

5 years ago

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 to error level on the next semver-major release of this package.

8.1.0

5 years ago

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

5 years ago

Fixes

  • Re-enable es6 environment to avoid errors like Promise/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

5 years ago

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

Rule changes

Contributors

@petrhanak 🍻

7.8.0

6 years ago

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. (d48b56ac2ac05cc0a288780f9b90faa43071e098)

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 (9c09a014e659629e6071a6b2f9aa3b36d405ddb7)
  • comma-dangle is now enforced for multiline function parameters (cffa40df10f4db719c264980aa13b9c4ce2288fc)
  • (flow) Return types are not needed if they can be inferred (05b0539c8d3178fb7fbaed388d95c7bb30f7739e)
  • (react): Properly set ecmaVersion to 2017 in react ruleset (#25 🍻 @petrhanak)
  • (react): Warn on console.log() usage (#26 🍻 @petrhanak)

New rules

  • Enable array-bracket-newline to require consistent array bracket placement (6721fd4b069f1d01b69ae9d26ed53d923c0cddf9)
  • Enable lines-between-class-members to require empty lines between class members (52a2dd048d4a0295de40ac5c82612c86ec500b62)
  • Enable multiline-comment-style to prefer separate comment lines for multiline comment blocks (77fe9678b20da7fc1cea6cd91a3713686a8b7d88)