Skip to content

Latest commit

 

History

History
551 lines (342 loc) · 20.1 KB

CHANGELOG.md

File metadata and controls

551 lines (342 loc) · 20.1 KB

Change Log

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.

15.0.0

Breaking

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

The following rules have been disabled or downgraded:

See inline comments for each as to why.

14.0.1

  • Bump lint-staged from 13.2.2 to 13.2.3
  • Bump @typescript-eslint/parser from 5.59.11 to 5.62.0

14.0.0

Updated

  • 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

Parser

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

Parser Options

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

13.2.1

Updated

  • 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

13.2.0

Updated

  • 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

13.1.0

Updated

  • 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

13.0.0

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

12.6.1

  • Bump eslint-plugin-backpack to latest.

12.6.0

Updated

  • 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

12.5.0

Added

  • Allow import() syntax in .d.ts files.

12.4.0

  • 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

12.3.0

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

12.2.0

  • Prefer default arguments to default props in functional components

12.1.1

Updated

  • Take into account the new Backpack single package in import groups.

12.1.0

  • Bump eslint-plugin-react from 7.28.0 to 7.30.0

12.0.0

Breaking

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

11.1.0

Updated

  • 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

11.0.0

Breaking

  • Published under the @skyscanner/ scope. To upgrade:
    • First uninstall eslint-config-skyscanner, then install @skyscanner/eslint-config-skyscanner.
    • In eslintrc file, update from extends: ['skyscanner'] to extends: ['@skyscanner/skyscanner'].
  • 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

Updated

  • 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

10.3.0

Added

  • consistent-type-imports to prefer type-imports

Updated

  • 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

10.3.0

Updated

  • 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

10.2.0

Patched

  • Upgrading eslint-plugin-typescript-enum from 2.0.11 to 2.1.0
  • Upgrading eslint-plugin-prettier from 3.4.0 to 3.4.1
  • Upgrading eslint-plugin-react-hooks from 4.2.0 to 4.3.0
  • Upgrading prettier from 2.3.0 to 2.3.2

10.1.0

Added

  • Add @typescript-eslint/array-type rule and specify array-simple for TypeScript files.

10.0.0

Added/Breaking

  • 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 under import/extensions
    • Adds eslint-plugin-typescript-enum to disallow TypeScript language expression feature enum
  • Bump prettier from 2.2.1 to 2.3.0
  • Bump eslint-plugin-react from 7.23.2 to 7.24.0

9.0.1 - Updating dependencies

Patched

  • 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

9.0.0 - Updating dependencies

Breaking

  • Upgrading eslint-config-prettier from 6.15.0 to 8.1.0
    • Major updates here: changelog
      • arrow-body-style and prefer-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.

Patched

  • Upgrading eslint from 7.14.0 to 7.23.0
  • Upgrading eslint-plugin-jest from 24.1.3 to 24.3.2
  • Upgrading eslint-plugin-jest-formatting from 2.0.0 to 2.0.1
  • Upgrading eslint-plugin-prettier from 3.1.4 to 3.3.1
  • Upgrading eslint-plugin-react from 7.21.5 to 7.23.1
  • Upgrading prettier from 2.2.0 to 2.2.1

8.1.0 - Upgrading dependencies

  • Upgrading prettier to 2.2.0 (https://prettier.io/blog/2020/11/20/2.2.0.html)

  • Upgrading eslint to 7.14.0

  • Upgrading eslint-plugin-backpack to 3.0.1

  • Upgrading eslint-config-airbnb to 18.2.1

  • Upgrading jest to 26.6.3

  • Upgrading eslint-plugin-jest to 24.1.3

8.0.2 - Upgrading backpack dependency

  • Upgrading eslint-plugin-backpack to 2.0.3

8.0.1 - Upgrading backpack dependency

  • Upgrading eslint-plugin-backpack to 2.0.2

8.0.0 - Upgraded eslint and other major changes

Migration guide here v7 to v8

Breaking

Changed

7.0.0 - Upgraded eslint-plugin-backpack

  • Upgraded eslint-plugin-backpack to the latest version. This introduces web support for the backpack/use-components rule. It accepts a platform option that can be set to web (default) or native. 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.

6.0.0 - Upgraded eslint-config-airbnb to latest major version

Breaking

  • Update eslint-config-airbnb to 18.1.0
  • Remove eslint-plugin-jest-dom, as it can create issues if @testing-library/jest-dom is not used.

Added

  • Integrate eslint-plugin-react-hooks.

5.4.0 - Added eslint-plugin-jest-dom

Added

  • Integrate eslint-plugin-jest-dom, see documentation for more into.

5.3.0 - Allow alias for deprecated React methods

Added

5.2.0 - Added eslint-plugin-jest-formatting and dependency updates

Added

  • Integrate eslint-plugin-jest-formatting, see documentation for more into.

Changed

  • Updated babel-eslint to 10.1.0
  • Updated eslint-plugin-react to 7.19.0

5.1.0 - This has been deprecated due to a publishing issue

5.0.0 - Added Prettier, new linting libraries and clean-up.

Added

Removed

  • Remove eslint-plugin-skyscanner-dates.

Changed

  • Upgraded Node 8 (lts/carbon) to Node 12 (lts/erbium).
  • Moved peerDependencies into dependencies.

5.0.0-beta.2 - Add skyscanner dates plugin

Changed

  • Integrate eslint-plugin-skyscanner-dates, see readme for more info.

5.0.0-beta.1 - Add import/order rule

Changed

  • 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 component import MyComponent from './MyComponent'). An example exists in the Backpack documentation website homepage.

4.1.0 - Add skyscanner dates plugin

Changed

  • Integrate eslint-plugin-skyscanner-dates, see readme for more info.

4.0.0

Includes all changes published in the previous betas.

4.0.0-beta.11 - Upgraded dependencies

Changed

4.0.0-beta.10 - Upgraded babel-eslint

Changed

  • Upgraded the following peer dependencies:

4.0.0-beta.9 - Upgraded eslint-config-airbnb

Changed

4.0.0-beta.8 - Disabled react/jsx-one-expression-per-line

Changed

4.0.0-beta.6 - New backpack/use-components rule added

Changed

  • Removed backpack/auto-import-tokens rule
  • Added backpack/use-components rule

4.0.0-beta.5 - React Destructuring assignment removed

Changed

  • Removed react/destructuring-assignment rule

4.0.0-beta.4 - Upgraded esling-config-airbnb peer dependencies

Changed

4.0.0-beta.3 - Auto-import Backpack tokens

Changed

  • Upgraded eslint-plugin-backpack: ^0.0.2 -> ^0.1.0
  • Added backpack/auto-import-tokens rule to the shared config

4.0.0-beta.2 - New Backpack rules

Changed

3.1.0 - Add skyscanner dates plugin

Changed

  • Integrate eslint-plugin-skyscanner-dates, see readme for more info.

3.0.0 - Upgraded esling-config-airbnb peer dependencies

Changed

2.0.0 - Changed parser to babel-eslint

Changed

  • Changed parser to babel-eslint to support dynamic import() statements used with Webpack 2

1.1.0 - Add JSDoc validation

Added

  • Validate JSDoc (when present)

1.0.0 - Upgraded airbnb config to v14

Changed

  • Upgraded peerDependencies to latest versions: eslint, eslint-config-airbnb, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react

0.0.2 - Fixing install

Fixed

  • Mirroring eslint-config-airbnb's peerDependencies so that install works

0.0.1 - Initial config

Added