Releases: vercel/style-guide
Releases · vercel/style-guide
v5.2.0
v5.2.0-canary.2
v5.2.0-canary.1
v5.1.0
v5.1.0-canary.1
5.1.0-canary.1 (2023-11-03)
Features
v5.0.2-canary.1
v5.0.1
v5.0.1-canary.1
v5.0.0
5.0.0 (2023-08-29)
Features
- eslint: change config for
import/no-extraneous-dependencies
(b81ebaa), closes #42 - eslint: enable
@typescript-eslint/require-array-sort-compare
(c55c6fc), closes #61 - eslint: enable
allowExpressions
in@typescript-eslint/explicit-function-return-type
(6b4214f), closes #51 - eslint: enable
eslint-comments/require-description
(ec761d9), closes #26 - eslint: enable
react/no-unknown-property
(2a4bd0e), closes #52 - eslint: introduce from
jest-react
config (8f612e0) - eslint: introduce rules from
playwright/recommended
(85f8b18) - eslint: update to ESLint 8.48.0 (dac7a98)
- eslint: upgrade
@typescript-eslint/*
and recommended configs (8c4c673), closes #66 - eslint: upgrade dependencies (8850581)
- prettier: upgrade to 3.x (f1346cd), closes #65
BREAKING CHANGES
- eslint: A compare function is now required when calling
sort
on non-string arrays. This change applies to TypeScript only. - eslint: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
- eslint: ESLint disable directives (comments) now require a description. An example migration script is available below.
- eslint:
import/no-extraneous-dependencies
now checks internal modules and type-only imports. - eslint:
react/no-unknown-property
has been enabled as it provides a useful auto-fix for SVG properties. - eslint: Upgrading to
@typescript-eslint/*@6.x
may have have enabled additional rules. - eslint: Rules for
@testing-library/react
have been moved to a newjest-react
config, which extends thejest
config. - eslint: Rules were enabled to align with the recommended rules from
eslint-plugin-playwright
. - eslint: ESLint 8.48.0 is now the minimum supported version.
- prettier: Prettier 3.0 is now the minimum supported version.
Migrations
For eslint-comments/require-description
, we've created this example script - which you can modify. It appends a placeholder comment to eslint-disable
directives without comments.
#!/bin/bash
# find all .js files in the current directory and all subdirectories
find . -type f \( -name '*.js' -o -name '*.ts' \) ! -path "*/node_modules/*" | while read file
do
### Use sed to modify strings
sed -i '' -E '/--/!s|^( *// eslint-disable.*)$|\1 -- [@vercel/style-guide@5 migration]|' "$file"
done
Co-authored-by: Vu Van Dung [email protected]
v5.0.0-canary.1
5.0.0-canary.1 (2023-08-29)
Features
- eslint: change config for
import/no-extraneous-dependencies
(b81ebaa), closes #42 - eslint: enable
@typescript-eslint/require-array-sort-compare
(c55c6fc), closes #61 - eslint: enable
allowExpressions
in@typescript-eslint/explicit-function-return-type
(6b4214f), closes #51 - eslint: enable
eslint-comments/require-description
(ec761d9), closes #26 - eslint: enable
react/no-unknown-property
(2a4bd0e), closes #52 - eslint: introduce from
jest-react
config (8f612e0) - eslint: introduce rules from
playwright/recommended
(85f8b18) - eslint: update to ESLint 8.48.0 (dac7a98)
- eslint: upgrade
@typescript-eslint/*
and recommended configs (8c4c673), closes #66 - eslint: upgrade dependencies (8850581)
- prettier: upgrade to 3.x (f1346cd), closes #65
BREAKING CHANGES
- eslint: A compare function is now required when calling
sort
on non-string arrays. This change applies to TypeScript only. - eslint: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
- eslint: ESLint disable directives (comments) now require a description. When migrating to this version, you may want to disable this rule for some files.
- eslint:
import/no-extraneous-dependencies
now checks internal modules and type-only imports. - eslint:
react/no-unknown-property
has been enabled as it provides a useful auto-fix for SVG properties. - eslint: Upgrading to
@typescript-eslint/*@6.x
may have have enabled additional rules. - eslint: Rules for
@testing-library/react
have been moved to a newjest-react
config, which extends thejest
config. - eslint: Rules were enabled to align with the recommended rules from
eslint-plugin-playwright
. - eslint: ESLint 8.48.0 is now the minimum supported version.
- prettier: Prettier 3.0 is now the minimum supported version.
Co-authored-by: Vu Van Dung [email protected]