Skip to content

Releases: Shopify/web-configs

@shopify/[email protected]

02 Feb 01:02
d69470f
Compare
Choose a tag to compare

Patch Changes

  • #461 b1b449c Thanks @BPScott! - Add @typescript-eslint/no-unused-expressions to typescript ruleset

    In v46 in, we enabled no-unused-expressions in the core js config, then disabled it and replaced it with @babel/no-unused-expressions in esnext config. In typescript files we turn off no-unused-expressions but left @babel/no-unused-expressions enabled - which seems like an oversight given that @typescript-eslint/no-unused-expressions existed. In v47.0.0 we removed configuration of @babel/no-unused-expressions entirely, which meant that there was no linting of unused-expressions. This change brings back unused expression linting to typescript files.

@shopify/[email protected]

31 Jan 17:12
039e352
Compare
Choose a tag to compare

Major Changes

  • #444 75fe8da Thanks @BPScott! - Replace eslint-plugin-node with eslint-plugin-n

  • #445 f1e02bc Thanks @BPScott! - Update plugin dependencies

    • eslint-plugin-import: ^2.29.0to ^2.31.0
    • eslint-plugin-jest: ^28.5.0to ^28.9.0
    • eslint-plugin-jsx-a11y: 6.8.0 to 6.10.2
    • eslint-plugin-prettier: ^5.1.3to^5.2.1
    • eslint-plugin-promise: ^6.1.1to^7.2.1
    • eslint-plugin-react: ^7.34.1to^7.37.2
    • eslint-plugin-react-hooks: ^4.6.2to^5.1.0
    • eslint-plugin-sort-class-members: ^1.20.0 to ^1.21.0
  • #457 ef24642 Thanks @BPScott! - Update typescript-eslint from ^7.9.0 to ^8.18.0. Replace usage of the @typescript-eslint/eslint-plugin and @typescript-eslint/eslint-parser packages with using the new typescript-eslint package. See migration information at https://typescript-eslint.io/blog/announcing-typescript-eslint-v8.

    The @typescript-eslint/ban-types rule has been removed and replaced with @typescript-eslint/no-empty-object-type and @typescript-eslint/no-wrapper-object-types. @typescript-eslint/no-require-imports is now enabled.

  • #455 e347da8 Thanks @BPScott! - Remove configuration of deprecated formatting rules.

    Per https://eslint.org/blog/2023/10/deprecating-formatting-rules/ and https://typescript-eslint.io/blog/deprecating-formatting-rules several formatting related rules have been deprecated from eslint core and typescript-eslint and moved into @stylistic/eslint-plugin. These rules are removed in typescript-eslint v8 (released) and probably eslint v10 (unreleased).

    To prepare for future updates we are removing our configuration of these rules. We recommend that you use Prettier (https://prettier.io/) for formatting considerations - either by running it in parallel with ESLint or as part of ESLint through using eslint-plugin-prettier via the prettier config provided by @shopify/eslint-plugin. If you do not wish to use Prettier, then we suggest you configure rules from @stylistic/eslint-plugin (https://eslint.style/packages/default).

    Note that if you already use the prettier config then this removal will have no effect as all these rules were already turned off.

    Configuration for the following rules in the es5, esnext and typescript configs have been removed:

    From typescript-eslint:

    • @typescript-eslint/brace-style
    • @typescript-eslint/func-call-spacing
    • @typescript-eslint/indent
    • @typescript-eslint/keyword-spacing
    • @typescript-eslint/member-delimiter-style
    • @typescript-eslint/no-extra-parens
    • @typescript-eslint/quotes
    • @typescript-eslint/semi
    • @typescript-eslint/space-infix-ops
    • @typescript-eslint/type-annotation-spacing

    From ESLint core:

    • array-bracket-spacing
    • arrow-parens
    • arrow-spacing
    • block-spacing
    • brace-style
    • comma-dangle
    • comma-spacing
    • comma-style
    • computed-property-spacing
    • dot-location
    • eol-last
    • func-call-spacing
    • function-paren-newline
    • generator-star-spacing
    • indent-legacy
    • jsx-quotes
    • key-spacing
    • keyword-spacing
    • lines-around-comment
    • lines-between-class-members
    • max-statements-per-line
    • new-parens
    • newline-per-chained-call
    • no-confusing-arrow
    • no-extra-semi
    • no-floating-decimal
    • no-mixed-operators
    • no-mixed-spaces-and-tabs
    • no-multi-spaces
    • no-multiple-empty-lines
    • no-tabs
    • no-trailing-spaces
    • no-whitespace-before-property
    • object-curly-spacing
    • one-var-declaration-per-line
    • operator-linebreak
    • padding-line-between-statements
    • quote-props
    • quotes
    • rest-spread-spacing
    • semi
    • semi-spacing
    • semi-style
    • space-before-blocks
    • space-before-function-paren
    • space-in-parens
    • space-infix-ops
    • space-unary-ops
    • spaced-comment
    • switch-colon-spacing
    • template-curly-spacing
    • template-tag-spacing
    • wrap-iife
    • yield-star-spacing

    We retain configuration for the following rules for the moment - even though they are depreated - as prettier does not have opinions about whitespace in these cases:

    • lines-between-class-members
    • padding-line-between-statements
    • spaced-comment
  • #450 9c5e826 Thanks @BPScott! - Remove Babel parser and plugin.

    The Babel plugin and parser are only useful when authoring JavaScript that uses syntax that has not yet reached stage 4 of the standardisation process.

    We do not wish to encourage the usage of non-standard syntax in .js files as a default supported behaviour.

    If you wish to continue to use non-standard syntax in .js files then you should add and configure @babel/eslint-parser and @babel/eslint-plugin yourself.

    • ESLint v8's semi and no-invalid-this rules provide the behaviour that @babel/semi, @babel/no-invalid-this were introduced to solve, and thus the babel versions of these rules are no longer requried.
    • @babel/new-cap exists to handle the non-standard decorator syntax.
    • @babel/object-curly-spacing exists to handle non-standard export x from "mod" syntax.
    • @babel/no-unused-expressions exists to handle non-standard "do expressions".

    Remove all mentions of @babel/* rules in your eslint config unless you configure the babel plugin yourself.

Minor Changes

  • #460 108c1cd Thanks @BPScott! - Fix false positives for prefer-module-scope-constants rule in *.cjs files

  • #453 a38a7ea Thanks @BPScott! - Replace usage of deprecated superTypeParameters with superTypeArguments

  • #451 8606071 Thanks @BPScott! - Use the "latest" ecmaVersion when parsing

  • #454 4cfd24c Thanks @BPScott! - Stop disabling rules that existed because we used their babel counterparts

  • #442 9931668 Thanks @BPScott! - Replace usage of deprecated APIs that will be removed in ESLint v9

@shopify/[email protected]

22 Oct 00:33
0323ba7
Compare
Choose a tag to compare

Major Changes

  • #438 0f7fde2 Thanks @brendo! - Replace deprecated scss/at-import-partial-extension rule with scss/load-partial-extension.

@shopify/[email protected]

25 Jul 19:05
fea6f31
Compare
Choose a tag to compare

Major Changes

@shopify/[email protected]

04 Jul 03:47
4fbf406
Compare
Choose a tag to compare

Major Changes

  • #426 f00d08d Thanks @kyledurand! - Bumped all dependencies. Dropped support for sylelint@14 and stylelint@15

Patch Changes

@shopify/[email protected]

18 May 02:36
2188fe8
Compare
Choose a tag to compare

Major Changes

  • #420 32e249f Thanks @BPScott! - Update required eslint version to ^8.56.0 as required by the newest version of @typescript-eslint/eslint-plugin.

    Update required node version to 18.20.0 as required by the newest version of @typescript-eslint/eslint-plugin.

    The jest/no-if rule has been removed and replaced with jest/no-conditional-in-test.

    The unicode-bom rule is no longer turned off if you enable the prettier ruleset per eslint-config-prettier, prettier preserves the bom value if it is present and does not add one if missing.

    Update eslint plugins to new versions:

    • @typescript-eslint/eslint-plugin: ^6.2.1 -> ^7.9.0 MAJOR
    • eslint-config-prettier: ^8.10.0 -> ^9.1.0 MAJOR
    • eslint-plugin-jest: ^27.2.3 => ^28.5.0 MAJOR
    • eslint-plugin-jsx-ally: ^6.7.1 => ^6.8.0
    • eslint-plugin-prettier: ^5.0.0 => ^5.1.3
    • eslint-plugin-react: ^7.33.1 => ^7.34.1
    • eslint-plugin-react-hooks: ^4.6.0 => ^4.6.2
    • eslint-plugin-sort-class-members: ^1.18.0 => ^1.20.0

    See package changelogs for breaking change information:

@shopify/[email protected]

04 Dec 20:38
118090a
Compare
Choose a tag to compare

Major Changes

  • #409 4fd9e99 Thanks @jas7457! - Change the @typescript-eslint/consistent-indexed-object-style rule to use default error settings, aka Record over index signature

@shopify/[email protected]

09 Aug 18:28
19c8d94
Compare
Choose a tag to compare

Major Changes

  • #400 cbfdb60 Thanks @BPScott! - Upgrade stylelint plugins to support prettier 3.x. Drop support for prettier 2.x.

@shopify/[email protected]

09 Aug 18:28
19c8d94
Compare
Choose a tag to compare

Major Changes

@shopify/[email protected]

30 Mar 17:55
5ab0fcf
Compare
Choose a tag to compare

Patch Changes

  • #375 7a0dcd1 Thanks @BPScott! - Don't replace top/right/bottom/left declarations with inset shorthand as inset is only supported in iOS Safari 14.5+