Skip to content

Releases: Skyscanner/eslint-config-skyscanner

13.1.0

02 Feb 23:23
Compare
Choose a tag to compare

What's Changed

  • 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

Full Changelog: v13.0.0...v13.1.0

13.0.0

10 Jan 15:30
94bc88d
Compare
Choose a tag to compare

What's Changed

Major Change

Standardised React Imports

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

Patch

Full Changelog: v12.6.1...v13.0.0

12.6.1

10 Jan 15:28
8c0ee0f
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v12.5.0...v12.6.1

12.6.0

08 Nov 14:06
Compare
Choose a tag to compare

What's Changed

  • 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

Full Changelog: v12.5.0...v12.6.0

12.5.0

23 Sep 13:20
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v12.4.0...v12.5.0

12.4.0

22 Aug 09:00
Compare
Choose a tag to compare

What's Changed

  • 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

Full Changelog: v12.3.0...v12.4.0

12.3.0

05 Aug 09:34
Compare
Choose a tag to compare

What's Changed

  • 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)

Full Changelog: v12.2.0...v12.3.0

12.2.0

29 Jun 13:23
Compare
Choose a tag to compare

What's Changed

Updated

  • Prefer default arguments to default props in functional components
  • If you were doing 'react/require-default-props': 'off' as a workaround you should now remove this suppression

Full Changelog: v12.1.0...v12.2.0

Details

defaultProps on function components is getting deprecated by React (see: https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#deprecate-defaultprops-on-function-components)

React currently logs a warning when defaultProps is used

The official recommendation in future versions of React is to use ES6 default values for function components.

It's been noticed that because of this limitation up until now, react apps have turned this rule off completely.

Before

Header.defaultProps = {
  currency: 'GBP',
};

export default function Header({ currency }) {

After

export default function Header({ currency = 'GBP' }) {

12.1.1

17 Jun 09:43
Compare
Choose a tag to compare

What's Changed

Full Changelog: v12.1.0...v12.1.1

12.1.0

02 Jun 13:19
Compare
Choose a tag to compare

What's Changed

Updated

  • Bump eslint-plugin-react from 7.28.0 to 7.30.0

Full Changelog: v12.0.0...v12.1.0