Skip to content

v1.4.0

Compare
Choose a tag to compare
@victorfsf victorfsf released this 31 Jan 14:43
· 24 commits to master since this release

Changelog

Dependencies changes

  • Set required eslint version to be 6.7.0 or greater.
  • Updated these packages:
    • babel-eslint from 10.0.2 to 10.0.3.
    • eslint-config-prettier from 6.0.0 to 6.10.0.
    • eslint-plugin-import from 2.18.0 to 2.20.0.
    • eslint-plugin-jest from 22.7.2 to 23.6.0.
    • eslint-plugin-prettier from 3.1.0 to 3.1.2.
    • eslint-plugin-react from 7.14.2 to 7.18.0.
    • eslint-plugin-react-hooks from 1.6.1 to 2.3.0.
    • eslint-plugin-sonarjs from 0.4.0 to 0.5.0.
    • eslint-plugin-unicorn from 9.1.1 to 15.0.1.
    • prettier from 1.18.2 to 1.19.1.

ESLint changes

Best practices

New rules

  • Added default-param-last as error.
  • Added grouped-accessor-pairs as error.
  • Added no-construtor-return as error.
  • Added prefer-regex-literals as error.

Errors

New rules

  • Added no-dupe-else-if as error.
  • Added no-import-assign as error.
  • Added no-setter-return as error.

Styling

New rules

  • Added prefer-exponentiation-operator as error.
  • Added no-ternary as off.

Config: Prettier

Prettier disabled the following rules in their config:

  • function-call-argument-newline.
  • unicorn/no-nested-ternary.

Plugin: Import

Options changes

  • Added '**/__generated__/**' to devDependencies option from import/no-extraneous-dependencies.
  • Added bundleDependencies: false to import/no-extraneous-dependencies.
  • Added alphabetize option (set to order: asc, caseInsensitive: true) to import/order.

Plugin: Jest

New rules

  • Added jest/no-duplicate-hooks as error.
  • Added jest/no-expect-resolves as error.
  • Added jest/no-export as error.
  • Added jest/no-if as error.
  • Added jest/no-standalone-expect as error.
  • Added jest/no-try-expect as error.
  • Added jest/require-top-level-describe as error.
  • Added jest/valid-title (replaces jest/empty-title) as error.
  • Added jest/prefer-hooks-on-top as error.
  • Added jest/require-to-throw-message (replaces jest/require-tothrow-message) as warn.

Removed rules

  • Removed jest/empty-title (deprecated).
  • Removed jest/require-tothrow-message (deprecated).

Plugin: React Hooks

  • Moved hooks rules from plugins/react to plugins/react-hooks.
    • Added react-hooks/rules-of-hooks as error.

Changed rules

  • Disabled react-hooks/exhaustive-deps.

Plugin: React

New rules

  • Added react/function-component-definition as error.
  • Added react/no-adjacent-inline-elements as error.
  • Added react/jsx-no-useless-fragment as error.
  • Added react/jsx-no-script-url as error.

Changed rules

  • Disabled react/jsx-handler-names.

Options changes

  • Added allowReferrer: false to react/jsx-no-target-blank.
  • Added static-variables to the first index of the order option from react/sort-comp.

Plugin: SonarJS

New rules

  • Added sonarjs/no-collection-size-mischeck as error.
  • Added sonarjs/no-redundant-jump as error.
  • Added sonarjs/no-same-line-conditional as error.
  • Added sonarjs/no-unused-collection as error.

Changed rules

  • Disabled sonarjs/no-identical-functions.
  • Disabled sonarjs/no-duplicate-string.

Plugin: Unicorn

New rules

  • Added unicorn/consistent-function-scoping as error.
  • Added unicorn/prefer-modern-dom-apis as error.
  • Added unicorn/prefer-negative-index as error.
  • Added unicorn/reflect-apply as error.
  • Added unicorn/string-slice as error.
  • Added unicorn/trim-start-end as error.
  • Added unicorn/expiring-todo-comments as off.
  • Added unicorn/prefer-dataset as off.