Releases: Shopify/web-configs
@shopify/[email protected]
Patch Changes
-
#461
b1b449c
Thanks @BPScott! - Add@typescript-eslint/no-unused-expressions
to typescript rulesetIn 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 offno-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]
Major Changes
-
#444
75fe8da
Thanks @BPScott! - Replaceeslint-plugin-node
witheslint-plugin-n
-
#445
f1e02bc
Thanks @BPScott! - Update plugin dependencieseslint-plugin-import
:^2.29.0
to^2.31.0
eslint-plugin-jest
:^28.5.0
to^28.9.0
eslint-plugin-jsx-a11y
:6.8.0
to6.10.2
eslint-plugin-prettier
:^5.1.3
to^5.2.1
eslint-plugin-promise
:^6.1.1
to^7.2.1
eslint-plugin-react
:^7.34.1
to^7.37.2
eslint-plugin-react-hooks
:^4.6.2
to^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 newtypescript-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 andtypescript-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 theprettier
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
andtypescript
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
andno-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-standardexport 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. - ESLint v8's
Minor Changes
-
#460
108c1cd
Thanks @BPScott! - Fix false positives forprefer-module-scope-constants
rule in*.cjs
files -
#453
a38a7ea
Thanks @BPScott! - Replace usage of deprecatedsuperTypeParameters
withsuperTypeArguments
-
#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]
@shopify/[email protected]
Major Changes
- #433
f09362b
Thanks @ryanwilsonperkin! - Switching to Eslint flat config format for v9
@shopify/[email protected]
Major Changes
- #426
f00d08d
Thanks @kyledurand! - Bumped all dependencies. Dropped support for sylelint@14 and stylelint@15
Patch Changes
- #428
f8ce1ef
Thanks @kyledurand! - Updated deprecated rules
@shopify/[email protected]
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 withjest/no-conditional-in-test
.The
unicode-bom
rule is no longer turned off if you enable the prettier ruleset pereslint-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
MAJOReslint-config-prettier
:^8.10.0
->^9.1.0
MAJOReslint-plugin-jest
:^27.2.3
=>^28.5.0
MAJOReslint-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]
@shopify/[email protected]
@shopify/[email protected]
Major Changes
-
#397
3895e25
Thanks @m4thieulavoie! - Upgrade eslint plugins to support prettier3.x
. Drop support for prettier2.x
. -
#399
b602765
Thanks @m4thieulavoie! - upgrade @typescript-eslint and eslint plugins and drop support for node 14