Releases: Skyscanner/eslint-config-skyscanner
13.2.1
What's Changed
- 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
Full Changelog: v13.2.0...v13.2.1
13.2.0
What's Changed
- 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
Notable updates
prettier
2.8.0 introduces support for TypeScript's satisfies
keyword: https://prettier.io/blog/2022/11/23/2.8.0.html
Full Changelog: v13.1.0...v13.2.0
13.1.0
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
What's Changed
Major Change
Standardised React Imports
- Disable default import of react by @samstradling in #452
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
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot in #465
- Bump eslint-plugin-prettier from 4.0.0 to 4.2.1 by @dependabot in #391
Full Changelog: v12.6.1...v13.0.0
12.6.1
What's Changed
- Bump @typescript-eslint/eslint-plugin from 5.33.1 to 5.40.1 by @dependabot in #437
- Bump @typescript-eslint/parser from 5.33.1 to 5.41.0 by @dependabot in #438
- Upgrade node version to support 18 / hydrogen by @metalix2 in #444
- Bump ansi-regex from 5.0.0 to 5.0.1 by @dependabot in #439
New Contributors
Full Changelog: v12.5.0...v12.6.1
12.6.0
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
What's Changed
- [SEARCHEXP-337] Allow import() type imports in .d.ts files by @Topolewski-Kamil in #418
New Contributors
- @Topolewski-Kamil made their first contribution in #418
Full Changelog: v12.4.0...v12.5.0
12.4.0
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
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
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' }) {