All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
1.1.0 (2022-07-01)
- Allow
tailwind.config
files for devDependencies imports check.
Follow the v0.6.0 recommended steps, with 1.1.0
as the version number.
Then, if your project disabled import/no-extraneous-dependencies
for Tailwind configuration files, this can now be removed.
1.0.0 (2022-05-30)
This release is functionally identical to v0.6.0.
The project has reached a high-enough level of stability, with no breaking changes expected in minor releases outside of rules changes as per ESLint’s policy.
Note the experimental TypeScript support is still experimental, and opt-in, and as such may still change in minor or patch releases.
0.6.0 (2022-03-09)
- Built-in TypeScript support, via an experimental opt-in
torchbox/typescript
configuration. - Additional peerDependencies added for TypeScript support:
@typescript-eslint/eslint-plugin
, and@typescript-eslint/parser
. Both will be installed automatically in npm v7+, and should not change how the base configuration works in any way.
Here are recommended steps:
# 1. Install the new versions.
npm install --save-dev eslint@8 eslint-config-torchbox@^0.6.0
# 2. Attempt to auto-fix any new issue picked up by ESLint.
npm run lint:js -- --fix
npm run format
# 3. Check if there are remaining issues
npm run lint:js
If there are remaining issues, consider a gradual approach: whether you want to update the code, or disable the corresponding rules. This can be done either in the ESLint configuration (globally or via overrides), or via eslint-disable
configuration comments. Get the rules reporting issues with: npm run lint:js -- --format tap | grep ruleId | cut -d ':' -f 2 | cut -c 2- | sort | uniq
.
For projects previously using custom TypeScript linting, review our guidance on linting setup for ongoing projects.
Projects previously using Babel for linting can now remove the babel-eslint
or @babel/eslint-parser
dependencies.
Finally, if your project uses separate dependencies definitions for pre-commit hooks, make sure to update them similarly.
0.5.0 (2021-12-13)
- Update to ESLint v8 and eslint-config-airbnb v19.0.2, changing rules that are applied with this config.
There are a number of existing rules that are now enforced:
- default-case-last
- default-param-last
- grouped-accessor-pairs
- no-constructor-return
- no-dupe-else-if
- no-import-assign
- no-loss-of-precision
- no-promise-executor-return
- no-restricted-exports (restricted: default, then)
- no-setter-return
- no-unreachable-loop
- no-useless-backreference
- prefer-exponentiation-operator (
**
overMath.pow
) - prefer-regex-literals
- react/jsx-no-script-url
- react/jsx-no-useless-fragment
And brand new rules introduced with this release:
- no-nonoctal-decimal-escape
- no-unsafe-optional-chaining
- import/no-import-module-exports
- import/no-relative-packages
- react/no-arrow-function-lifecycle
- react/no-invalid-html-attribute
- react/no-namespace
- react/no-unstable-nested-components
- react/no-unused-class-component-methods
- react/jsx-no-constructed-context-values
This release updates most of the dependencies of the config:
package | from | to |
---|---|---|
eslint | ^7.2.0 | ^8.2.0 |
eslint-config-airbnb | ^18.2.1 | ^19.0.2 |
eslint-config-prettier | ^8.3.0 | ^8.3.0 |
eslint-plugin-react | ^7.24.0 | ^7.27.1 |
eslint-plugin-react-hooks | ^4.2.0 | ^4.3.0 |
eslint-plugin-jsx-a11y | ^6.4.1 | ^6.5.1 |
eslint-plugin-import | ^2.23.4 | ^2.25.3 |
Users of npm v7 can npm install --save-dev eslint-config-torchbox@latest
and this will automatically install all required peer dependencies.
For older versions of npm, use npx install-peerdeps --dev eslint-config-torchbox@latest
so all other peerDependencies are updated as well.
Here are recommended steps:
# 1. Install the new versions.
npm install --save-dev eslint@8 eslint-config-torchbox@^0.5.0
# 2. Attempt to auto-fix any new issue picked up by ESLint.
npm run lint:js -- --fix
npm run format
# 3. Check if there are remaining issues
npm run lint:js
If there are remaining issues, consider a gradual approach: whether you want to update the code, or disable the corresponding rules. This can be done either in the ESLint configuration (globally or via overrides), or via eslint-disable
configuration comments. Get the rules reporting issues with: npm run lint:js -- --format tap | grep ruleId | cut -d ':' -f 2 | cut -c 2- | sort | uniq
. For projects strapped for time, disabling all new rules listed above may be a reasonable tradeoff.
Finally, if your project uses separate dependencies definitions for pre-commit hooks, make sure to update them similarly.
0.4.0 (2021-07-15)
- Update to ESLint v7 and eslint-config-airbnb v18.2.1, changing rules that are applied with this config.
- Update to eslint-config-prettier v8, which no longer requires specifying sub-configurations separately for different frameworks or syntaxes.
Here is a summary of significant rule changes:
jsx-a11y/aria-role (https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md):
-`error, ignoreNonDom: false`
+`error, ignoreNonDOM: false`
react/sort-comp (https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md):
-`error, order: static-methods, instance-variables, lifecycle,…`
+`error, order: static-variables, static-methods, instance-var…`
react/jsx-props-no-spreading (https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md):
-`error, html: enforce, custom: enforce, exceptions:`
+`error, html: enforce, custom: enforce, explicitSpread: ignore`
import/order (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md):
-`error, groups: builtin, external, internal`
+`error, groups: builtin, external, internal, warnOnUnassigned…`
import/no-cycle (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md):
-`error, maxDepth: null`
+`error, maxDepth: ∞, ignoreExternal: false`
import/no-useless-path-segments (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md)
- `error`
+`error, commonjs: true`
array-callback-return (https://eslint.org/docs/rules/array-callback-return):
-`error, allowImplicit: true`
+`error, allowImplicit: true, checkForEach: false`
No longer enforced:
- jsx-a11y/accessible-emoji (https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md) (deprecated)
This release updates most of the dependencies of the config:
package | from | to |
---|---|---|
eslint | ^6.0.0 | ^7.2.0 |
eslint-config-airbnb | ^18.0.0 | ^18.2.1 |
eslint-config-prettier | ^6.0.0 | ^8.3.0 |
eslint-plugin-react | ^7.16.0 | ^7.24.0 |
eslint-plugin-react-hooks | ^1.7.0 | ^4.2.0 |
eslint-plugin-jsx-a11y | ^6.2.0 | ^6.4.1 |
eslint-plugin-import | ^2.18.0 | ^2.23.4 |
Users of npm v7 can npm install --save-dev eslint-config-torchbox@latest
and this will automatically install all required peer dependencies.
For older versions of npm, use npx install-peerdeps --dev eslint-config-torchbox@latest
so all other peerDependencies are updated as well.
Here are recommended steps:
# 1. Install the new versions.
npm install --save-dev eslint@7 eslint-config-torchbox@^0.4.0
# 2. Attempt to auto-fix any new issue picked up by ESLint.
npm run lint:js -- --fix
npm run format
# 3. Check if there are remaining issues
npm run lint:js
If there are remaining issues, consider a gradual approach: whether you want to update the code, or disable the corresponding rules. This can be done either in the ESLint configuration (globally or via overrides), or via eslint-disable
configuration comments. Get the rules reporting issues with: npm run lint:js -- --format tap | grep ruleId | cut -d ':' -f 2 | cut -c 2- | sort | uniq
.
Finally, if your project uses separate dependencies definitions for pre-commit hooks, make sure to update them similarly.
0.3.3 (2020-03-12)
- Fix dev dependencies warnings in Storybook config and stories written in
.stories.js
files.
0.3.2 (2019-10-15)
- Allow
setupTests
files for devDependencies imports check.
0.3.1 (2019-10-09)
- Add missing
airbnb/hooks
extend for the React Rules of hooks (#3, #10).
0.3.0 (2019-10-08)
- Update to ESLint v6 and eslint-config-airbnb v18, significantly changing rules that are applied with this config (#4, #10).
- Include rules for the React Rules of hooks (#3, #10), from the airbnb config update.
- Automatically detect which version of React is being used on the project to lint accordingly (part of the airbnb config update) (#10).
This release updates most of the dependencies of the config:
package | from | to |
---|---|---|
eslint | ^5.0.0 | ^6.0.0 |
eslint-config-airbnb | ^17.1.0 | ^18.0.0 |
eslint-plugin-react | ^7.14.0 | ^7.16.0 |
eslint-plugin-react-hooks | N/A | ^1.7.0 |
To update, use npx install-peerdeps --dev eslint-config-torchbox@latest
so all other peerDependencies are updated as well.
Additionally, this config now requires react
to be defined as a dependency on the project. Please refer to our React configuration instructions if you wish to bypass this.
Projects considering this release should skip straight to v0.4.0.
0.2.0 (2019-07-16)
- The configuration is now defined based on eslint-config-airbnb (#1, #2).
- Now includes environment configuration for Jest tests.
- The configuration is now defined based on eslint-config-airbnb (#1, #2).
Projects considering this release should skip straight to v0.4.0.
0.1.0 (2019-07-04)
First release