This file remains for historical references, but all new releases are now documented in the package's Releases page.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Bump eslint-config-airbnb from 18 to 19
- Bump eslint from 7 to 8
This update is intended to be as low friction as possible, with incoming rules that cause more toil than gain disabled.
However, it does bring in several new, very valuable, rules, so it is expected to need work to fix these lint errors when making this upgrade. If you do not agree with any of the incoming rules please reach out to talk about solving it in a centralised way before making local overrides.
All new rules will point to documentation about that rule, with examples of fixes, if they trigger in your codebase.
If you use @skyscanner/stylelint-config-skyscanner
please update to version 9, to match this change, as it shares transitive dependencies: https://github.com/Skyscanner/stylelint-config-skyscanner/blob/main/docs/eslint-as-dependency.md
ESLint release notes:
AirBnB Config Release notes:
- https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.0/packages/eslint-config-airbnb/CHANGELOG.md#1900--2021-11-10
- https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.0/packages/eslint-config-airbnb-base/CHANGELOG.md#1500--2021-11-08
The following rules have been disabled or downgraded:
- react/function-component-definition
- react/jsx-no-useless-fragment
- react/prefer-exact-props
- import/no-relative-packages
- default-param-last
See inline comments for each as to why.
- Bump lint-staged from 13.2.2 to 13.2.3
- Bump @typescript-eslint/parser from 5.59.11 to 5.62.0
- Update from babel-eslint to @babel/eslint-parser
babel-eslint
was deprecated on July 31, 2020 in favour of the package from Babel's main mono repo; @babel/eslint-parser
.
If using the standard Skyscanner tool chain as described in our Production Standards then for the majority of consumers this will be a patch level change.
However, if your repository is using non-standard presets then some additional configuration may be required.
Upgrade Details
eslint-config-skyscanner
sets
parser: '@babel/eslint-parser',
by default, and overrides this for .ts?(x)
files to
parser: '@typescript-eslint/parser',
If you were previous declaring parser
explicitly in your eslintrc
this will need to be updated, or removed (to inherit the behaviour as above).
For JavaScript eslint-config-skyscanner
sets
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
},
and for .ts?(x)
plugins: ['@typescript-eslint'],
This will not require a Babel config file, but if one is present will use it by default. It includes support for React syntax and TypeScript by default.
If you have extended your project beyond this to non-standard Skyscanner syntax, and this is not in your root Babel config, then you will need to override these settings in your eslintrc
for Babel to be able to parse your code while ESLint runs.
https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser#additional-parser-configuration
- Bump @typescript-eslint/parser from 5.50.0 to 5.59.8
- Bump @typescript-eslint/eslint-plugin from 5.53.0 to 5.59.9
- Bump lint-staged from 13.0.3 to 13.2.2
- Bump jest from 29.4.3 to 29.5.0
- Bump eslint-plugin-sort-destructure-keys from 1.4.0 to 1.5.0
- Bump jest from 27.5.1 to 29.4.3
- Bump husky from 8.0.1 to 8.0.3
- Bump eslint-plugin-jsx-a11y from 6.5.1 to 6.7.1
- Bump prettier from 2.7.1 to 2.8.4
- Bump eslint-plugin-react-hooks from 4.3.0 to 4.6.0
- Bump @typescript-eslint/eslint-plugin from 5.49.0 to 5.53.0
- Bump eslint-plugin-import from 2.25.4 to 2.27.5
- Bump @typescript-eslint/eslint-plugin from 5.40.1 to 5.49.0
- Bump @typescript-eslint/parser from 5.41.0 to 5.50.0
- Bump eslint-plugin-react from 7.30.1 to 7.32.2
This ensures that the 'preferred style' is used for react imports:
Change all default React imports (i.e. import React from "react") to destructured named imports (ex. import { useState } from "react") which is the preferred style going into the future.
There is a codemod here created by the react team to change this in your codebase: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports
- Bump
eslint-plugin-backpack
to latest.
- Update from Node
^16.13.0
to>=16.13.0
to allow versions higher than 16 - Bump @typescript-eslint/eslint-plugin from 5.33.1 to 5.40.1
- Bump @typescript-eslint/parser from 5.33.1 to 5.40.1
- Bump ansi-regex from 5.0.0 to 5.0.1
- Allow
import()
syntax in.d.ts
files.
- Override the no-restricted-syntax syntax rule to allow
for...of
loops. (#398) - Bump @typescript-eslint/parser from 5.31.0 to 5.33.1
- Bump @typescript-eslint/eslint-plugin from 5.32.0 to 5.33.1
- Bump prettier from 2.5.1 to 2.7.1
- Bump eslint-plugin-react from 7.30.0 to 7.30.1
- Update guides about how to extend config to consistently say 'add @skyscanner/eslint-config-skyscanner'
- Bump @typescript-eslint/parser from 5.12.0 to 5.31.0
- Bump @typescript-eslint/eslint-plugin from 5.12.0 to 5.32.0
- Bump lint-staged from 13.0.0 to 13.0.3
- Bump eslint-config-prettier from 8.3.0 to 8.5.0
- Bump husky from 7.0.4 to 8.0.1 (drop Node 12 support)
- Prefer default arguments to default props in functional components
- Take into account the new Backpack single package in import groups.
- Bump eslint-plugin-react from 7.28.0 to 7.30.0
- Drops support for Node versions < 16. No new functionality is introduced, but from this point forwards it should not be assumed Node 12 will work.
- Bump
eslint-plugin-backpack
to latest.
- Take into account css files in import groups order (fixable using
--fix
). - Revert enforcing imports being sorted alphabetically; do not specify
- Bump eslint-plugin-prettier from 3.4.1 to 4.0.0
- Bump @typescript-eslint/parser from 5.10.1 to 5.12.0
- Bump @typescript-eslint/eslint-plugin from 5.10.1 to 5.12.0
- Published under the
@skyscanner/
scope. To upgrade:- First uninstall
eslint-config-skyscanner
, then install@skyscanner/eslint-config-skyscanner
. - In
eslintrc
file, update fromextends: ['skyscanner']
toextends: ['@skyscanner/skyscanner']
.
- First uninstall
- Change import groups order, and paths must be sorted alphabetically (fixable using
--fix
). - Require object destructure key to be sorted (fixable using
--fix
). - Bump eslint-plugin-jest-formatting from 2.0.1 to 3.1.0
- Bump eslint-plugin-jest from 24.3.6 to 26.0.0
- Bump eslint from 7.25.0 to 7.32.0
- Bump eslint-plugin-import from 2.22.1 to 2.25.4
- Bump @typescript-eslint/parser from 5.9.1 to 5.10.1
- Bump @typescript-eslint/eslint-plugin from 5.9.0 to 5.10.1
consistent-type-imports
to prefertype-imports
- Bump @typescript-eslint/eslint-plugin from 5.8.0 to 5.9.0
- Bump @typescript-eslint/parser from 5.8.0 to 5.9.1
- Bump prettier from 2.3.2 to 2.5.1
- Bump @typescript-eslint/eslint-plugin from 5.3.0 to 5.8.0
- Bump @typescript-eslint/parser from 5.1.0 to 5.8.0
- Bump eslint-plugin-react from 7.24.0 to 7.28.0
- Bump lint-staged from 12.0.2 to 12.1.4
- Bump jest from 26.6.3 to 27.4.5
- Bump eslint-plugin-jsx-a11y from 6.4.1 to 6.5.1
- Upgrading
eslint-plugin-typescript-enum
from2.0.11
to2.1.0
- Upgrading
eslint-plugin-prettier
from3.4.0
to3.4.1
- Upgrading
eslint-plugin-react-hooks
from4.2.0
to4.3.0
- Upgrading
prettier
from2.3.0
to2.3.2
- Add
@typescript-eslint/array-type
rule and specifyarray-simple
for TypeScript files.
- Support TypeScript. These changes are only breaking if you were already using TypeScript in your project.
- Adds overrides for
.ts?(x)
files taken from react-scripts, adds@typescript-eslint/eslint-plugin
and@typescript-eslint/parser
. - Adds config for
.ts?(x)
extensions underimport/extensions
- Adds
eslint-plugin-typescript-enum
to disallow TypeScript language expression featureenum
- Adds overrides for
- Bump
prettier
from2.2.1
to2.3.0
- Bump eslint-plugin-react from 7.23.2 to 7.24.0
- Bump eslint from 7.23.0 to 7.25.0
- Bump eslint-config-prettier from 8.1.0 to 8.3.0
- Bump eslint-plugin-jest from 24.3.2 to 24.3.6
- Bump eslint-plugin-react from 7.23.1 to 7.23.2
- Bump eslint-plugin-prettier from 3.3.1 to 3.4.0
- Upgrading
eslint-config-prettier
from6.15.0
to8.1.0
- Major updates here: changelog
arrow-body-style
andprefer-arrow-callback
are now no longer turned off by default, bringing cleaner code changes with enabling these. All reported issues should be fixable using--fix
option.
- Major updates here: changelog
- Upgrading
eslint
from7.14.0
to7.23.0
- Upgrading
eslint-plugin-jest
from24.1.3
to24.3.2
- Upgrading
eslint-plugin-jest-formatting
from2.0.0
to2.0.1
- Upgrading
eslint-plugin-prettier
from3.1.4
to3.3.1
- Upgrading
eslint-plugin-react
from7.21.5
to7.23.1
- Upgrading
prettier
from2.2.0
to2.2.1
-
Upgrading
prettier
to2.2.0
(https://prettier.io/blog/2020/11/20/2.2.0.html) -
Upgrading
eslint
to 7.14.0 -
Upgrading
eslint-plugin-backpack
to3.0.1
-
Upgrading
eslint-config-airbnb
to18.2.1
-
Upgrading
jest
to26.6.3
-
Upgrading
eslint-plugin-jest
to 24.1.3
- Upgrading
eslint-plugin-backpack
to2.0.3
- Upgrading
eslint-plugin-backpack
to2.0.2
Migration guide here v7 to v8
- Updated
eslint
to7.11.0
- Updated
eslint-plugin-jest
to24.1.0
- Updated
eslint-plugin-react-hooks
to4.1.2
- Updated
prettier
to2.1.2
-
Turned off
backpack/use-components
due to a bug withautoImport
not correctly turning off when configured. -
Updated
eslint-config-airbnb
to18.2.0
-
Updated
eslint-plugin-jsx-a11y
to6.3.1
-
Updated
eslint-plugin-react
to7.21.4
- Upgraded
eslint-plugin-backpack
to the latest version. This introduces web support for thebackpack/use-components
rule. It accepts aplatform
option that can be set toweb
(default) ornative
. See the eslint-plugin-backpack docs for more information. - This is only a breaking change for React Native users, because the rule now defaults to web components.
- Update eslint-config-airbnb to 18.1.0
- Migration guide here v5 to v6
- Remove
eslint-plugin-jest-dom
, as it can create issues if@testing-library/jest-dom
is not used.
- Integrate
eslint-plugin-react-hooks
.
- Integrate
eslint-plugin-jest-dom
, see documentation for more into.
- Allow alias for deprecated React component lifecycle methods (like
UNSAFE_componentWillReceiveProps
). See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
- Integrate
eslint-plugin-jest-formatting
, see documentation for more into.
- Updated
babel-eslint
to10.1.0
- Updated
eslint-plugin-react
to7.19.0
- Integrated Prettier. See the migration guide from v4 to v5.
- Integrate
eslint-plugin-jest
, see documentation for more into. - Integrate
eslint-plugin-eslint-comments
, see documentation for more info.
- Remove
eslint-plugin-skyscanner-dates
.
- Upgraded Node 8 (lts/carbon) to Node 12 (lts/erbium).
- Moved
peerDependencies
intodependencies
.
- Integrate
eslint-plugin-skyscanner-dates
, see readme for more info.
- New
import/order
rule (see #21).- Note: This can introduce visual bugs where CSS rule order is influenced by the order in which stylesheets are imported (either directly
import 'my-style.scss';
or indirectly via a componentimport MyComponent from './MyComponent'
). An example exists in the Backpack documentation website homepage.
- Note: This can introduce visual bugs where CSS rule order is influenced by the order in which stylesheets are imported (either directly
- Integrate
eslint-plugin-skyscanner-dates
, see readme for more info.
Includes all changes published in the previous betas.
- Upgraded the following peer dependencies:
- babel-eslint:
^10.0.0
->^10.0.1
- eslint:
^5.6.0
->^5.12.0
- eslint-plugin-jsx-a11y:
^6.1.1
->^6.1.2
- eslint-plugin-react:
^7.11.1
->^7.12.3
- babel-eslint:
- Upgraded the following peer dependencies:
- babel-eslint:
^8.2.6
->^10.0.0
- eslint:
^5.4.0
->^5.6.0
- babel-eslint:
- Upgraded the following peer dependencies:
- babel-eslint:
^8.2.5
->^8.2.6
- eslint:
^4.19.1
->^5.4.0
- eslint-config-airbnb:
^17.0.0
->^17.1.0
- eslint-plugin-import:
^2.13.0
->^2.14.0
- eslint-plugin-jsx-a11y:
^6.1.0
->^6.1.1
- eslint-plugin-react:
^7.10.0
->^7.11.1
- eslint-plugin-backpack:
^0.2.0
->^0.2.2
- babel-eslint:
- Relaxed the rule for
jsx-a11y/label-has-associated-control
to only asserteither
as opposed toboth
.
- Disabled
react/jsx-one-expression-per-line
, temporarily - https://github.com/airbnb/javascript/commit/b6a268f780177e03b573a4f0df95ecc0d2e8783e#diff-c0191b2bdd5bfebebb8cec31d0f3993c
- Removed
backpack/auto-import-tokens
rule - Added
backpack/use-components
rule
- Removed
react/destructuring-assignment
rule
- Upgraded the following peer dependencies:
- babel-eslint:
^8.0.1
->^8.2.5
- eslint:
^4.9.0
->^4.19.1
- eslint-config-airbnb:
^16.1.0
->^17.0.0
- eslint-plugin-import:
^2.8.0
->^2.10.0
- eslint-plugin-jsx-a11y:
^6.0.2
->^6.1.0
- eslint-plugin-react:
^7.4.0
->^7.10.0
- eslint-plugin-backpack:
^0.0.2
->^0.1.0
- babel-eslint:
- Upgraded eslint-plugin-backpack:
^0.0.2
->^0.1.0
- Added
backpack/auto-import-tokens
rule to the shared config
- Added support for backpack plugin
- Integrate
eslint-plugin-skyscanner-dates
, see readme for more info.
- Upgraded the following peer dependencies:
- babel-eslint:
^7.2.3
->^8.0.1
- eslint:
^3.17.1
->^4.9.0
- eslint-config-airbnb:
^14.1.0
->^16.1.0
- eslint-plugin-import:
^2.2.0
->^2.8.0
- eslint-plugin-jsx-a11y:
^4.0.0
->^6.0.2
- eslint-plugin-react:
^6.10.0
->^7.4.0
- babel-eslint:
- Changed parser to
babel-eslint
to support dynamicimport()
statements used with Webpack 2
- Validate JSDoc (when present)
- Upgraded peerDependencies to latest versions:
eslint
,eslint-config-airbnb
,eslint-plugin-import
,eslint-plugin-jsx-a11y
,eslint-plugin-react
- Mirroring eslint-config-airbnb's peerDependencies so that install works
- Initial config based on
eslint-config-airbnb