Skip to content

Latest commit

 

History

History
367 lines (216 loc) · 13 KB

CHANGELOG.md

File metadata and controls

367 lines (216 loc) · 13 KB

eslint-config-seek

13.1.0

Minor Changes

  • Adds no-fallthrough as an error. (#135) This disallows fallthrough of case statements in switch statements.

    Examples

    You need to add a break, return or throw to each case. You can also skip this rule if it is intentionally absent (however that is a rare scenario).

    switch (name) {
      case 'John':
        console.log('Hi John');
    +   break;
    }

Patch Changes

13.0.0

Major Changes

  • Upgrade Typescript Eslint to 7.2.0 to support Typescript 5.4. (#136)

    This bumps the minimum required versions of Node.js to 18.18.0, Eslint to 8.56.0 and Typescript to 4.7.5 due to a breaking change introduced by Typescript Eslint in 7.0.0.

12.1.1

Patch Changes

  • Prevents the new curly-brace-presence rule from affecting children. (#133)

    In the previous version, react/jsx-curly-brace-presence was added to the eslint rules. This was primarily intended to catch unnecessarily using braces around string props.

    - <Stack space={'medium'}>
    + <Stack space="medium">

    Because of the configuration we provided, this had the unintended side effect of removing curly braces inside child text that were being used to prevent the unescaped entities rule.

    - <Text>The available props are {'"up"'} and {'"down"'}</Text>
    + <Text>The available props are "up" and "down"</Text>
    // This is now an unescaped entity error

    To fix this, the curly brace rule will now ignore children, and only alert on prop values.

12.1.0

Minor Changes

  • Adds react/jsx-curly-brace-presence as an error. (#130) This removes unnecessary braces around strings in props and children.

    It also enforces braces around expressions in props and children.

    Examples

    // Unecessary braces around string prop
    - <Column width={'content'}>
    + <Column width="content">
    // Unecessary braces around string child
    - <Text>{'Hello'}</Text>
    + <Text>Hello</Text>
    // Mandatory braces around prop expression
    - <Button icon=<IconSearch />>
    + <Button icon={<IconSearch />}>

12.0.1

Patch Changes

  • Fix array-type rule (#128)

12.0.0

Major Changes

  • Bump up typescript-eslint monorepo to ^6.0.0. (#125)

    This requires eslint 7+.

    This change also includes a number of rule changes to the default configuration. Read the release notes for more information.

11.3.1

Patch Changes

  • Add a temporary override until everybody removes the React import (#122)

11.3.0

Minor Changes

Patch Changes

  • Update dependencies (#120)

  • Disable resolving node_modules from the root of the repo. This is problematic for JavaScript-only monorepos (where there are multiple node_modules directories). (#119)

  • Add a workaround for TypeScript-ESLint slowness with TypeScript 5.1 (#117)

11.2.1

Patch Changes

  • Remove autofix for custom unsafe-to-chain-command rule (#115)

    The autofix for this rule didn't exactly adhere to the recommendation in the cypress docs, and would've required additional complexity and user-configuration to do so, so the decision was made to remove it.

11.2.0

Minor Changes

  • Add autofix for custom unsafe-to-chain-command rule (#113)

11.1.3

Patch Changes

  • Fix broken custom eslint rule (#111)

11.1.2

Patch Changes

  • Replace eslint-plugin-cypress with the @finsit/eslint-plugin-cypress fork that supports ESLint v8. (#106) Consumers that were overriding cypress/* rules will need to override @finsit/cypress/* rules instead.

11.1.1

Patch Changes

  • Move the Babel React preset parser option from the "base" configuration to the "default" configuration. (#103)

    This update contains no functional changes to the "default" configuration.

11.1.0

Minor Changes

  • Export extensions linted by the config (#101)

    They are now available under the /extensions entry point:

    const { js, ts } = require('eslint-config-seek/extensions');
    // js: ['js', 'cjs', 'mjs', 'jsx']
    // ts: ['ts', 'cts', 'mts', 'tsx']

Patch Changes

  • Fix resolution of @babel/preset-react (#100)

11.0.1

Patch Changes

  • Update parserOptions.project for TypeScript files to be true. (#98)

11.0.0

Major Changes

  • Add additional rules enforcing consistent type imports/exports (#96)

10.3.0

Minor Changes

  • Split config into default (current) and base (without a React dependency). (#94)

    Without React support:

    {
      "extends": "seek/base"
    }

    With React support:

    {
      "extends": "seek"
    }

10.2.0

Minor Changes

  • Enable linting for more extensions: .cjs, .mjs, .cts, .mts (#90)

Patch Changes

  • Update dependencies (#91)

10.1.3

Patch Changes

  • Dependency bumps (Babel, ESLint, TypeScript) (#88)

10.1.2

Patch Changes

  • Allow the cypress folder to be nested (#86)

10.1.1

Patch Changes

  • Re-added missing no-undef rule for .js/.jsx files (#84)

10.1.0

Minor Changes

  • Enhanced TypeScript support for eslint-plugin-import via eslint-import-resolver-typescript (#81)

    This means you can:

    • import/require files with extension .cts/.mts/.ts/.tsx/.d.cts/.d.mts/.d.ts
    • Use paths defined in tsconfig.json
    • Prefer resolving @types/* definitions over plain .js/.jsx
    • Multiple tsconfigs support just like normal (i.e. in a monorepo)
    • imports/exports fields support in package.json

Patch Changes

  • Fixed TypeScript support for eslint-plugin-import (#81)

    Some rules provided by eslint-plugin-import (e.g. import/no-duplicates, import/order) don't work or work incorrectly without it.

    Before — passes:

    import { ComponentDocs as InternalComponentDocs } from '@monorepo/docs';
    import braidSnippets from 'braid-design-system/lib/playroom/snippets';
    import { Snippets } from 'playroom';
    import reactElementToJsxString from 'react-element-to-jsx-string';

    After — correctly identifies @monorepo/docs as internal (as defined in sku) and moves it after the external imports:

    import braidSnippets from 'braid-design-system/lib/playroom/snippets';
    import { Snippets } from 'playroom';
    import reactElementToJsxString from 'react-element-to-jsx-string';
    
    import { ComponentDocs as InternalComponentDocs } from '@monorepo/docs';
  • Upgrade dependencies (#81)

10.0.0

Major Changes

  • eslint-plugin-jest 27 (#79)

    This major release includes breaking changes. See the release note for more information.

    The jest/no-alias-methods rule is now enforced to discourage usage of alias methods that will be removed in Jest 30.

    - .toBeCalled()
    + .toHaveBeenCalled()

9.0.0

Major Changes

  • Support ESLint 8.x (#73)

    We've upgraded the parsers and plugins bundled in eslint-config-seek for ESLint 8.x compatibility. Some linting rules have changed and may require manual triage. In particular, we've applied the following major upgrades:

    eslint-plugin-cypress is currently incompatible with ESLint 8.x. Projects that utilise Cypress should remain on ESLint 7.x.

Minor Changes

8.0.0

Major Changes

  • Remove support for Flow (#64)

    SEEK has aligned on TypeScript for static type checking. Flow support was similarly removed in sku 11.

    Affected projects should migrate to TypeScript.

  • Remove support for CSS Modules (#64)

    eslint-plugin-css-modules is unmaintained, and SEEK has since moved on to vanilla-extract.

    Affected projects should migrate to vanilla-extract.

Patch Changes

  • Detect the react version (#68)