0.9.0
Changelog for the official Arctic Ice Studio JavaScript code style.
Features
Update ESLint and plugins — #31 ⇄ #32 (⊶ 486b2d1)
↠ ESLint and most of the used plugins released new major versions so trying to use later versions of these plugins as well as ESLint itself caused errors when using npm v7 because peer dependencies are installed automatically now, which is a fantastic change, but also breaks and blocks the usage of the configuration packages due to outdated peerDependencies
like eslint@^6
.
Core
The latest version 7 comes with great features and improvements.
See the official v7 migration guide for all details.
- Updated ESLint package version — updated from
v6.2.0
tov7.23.0
. - Allowed to define additional file extensions in configuration packages — files matched by
overrides[].files
are now linted by default which allows to add extensions like*.ts
and*.tsx
to the@arcticicestudio/eslint-config-typescript
without the need to specify this override over and over again in each project. - Removed deprecated rules — some rules have been deprecated and have been removed in favor of the support for
eslint-plugin-node
like documented in #30.callback-return
→node/callback-return
global-require
→node/global-require
handle-callback-err
→node/handle-callback-err
no-mixed-requires
→node/no-mixed-requires
no-new-require
→node/no-new-require
no-path-concat
→node/no-path-concat
no-process-env
→node/no-process-env
no-process-exit
→node/no-process-exit
no-restricted-modules
→node/no-restricted-modules
no-sync
→node/no-sync
- Adapted new recommended rules — some rules have been added and enabled on the
eslint:recommended
rule set and have ben added to@arcticicestudio/eslint-config-base
witherror
level:
Plugins & Dependencies
@arcticicestudio/eslint-config
- eslint-config-prettier — Bumped version from
v6.0.0
tov8.1.0
. As of version8.0.0
all rule sets have been merged into the mainprettier
set. Therefore the additionalprettier/react
set has been removed from theextends
array of the Prettier specific rules. - eslint-find-rules — Bumped version from
v3.4.0
tov3.6.1
. - eslint-plugin-import — Bumped minimum version from
v2.18.2
tov2.22.1
. - eslint-plugin-jsx-a11y — Bumped minimum version from
v6.2.3
tov6.4.1
. - eslint-plugin-prettier — Bumped minimum version from
v3.1.0
tov3.3.1
. - eslint-plugin-react — Bumped minimum version from
v7.14.3
tov7.23.1
. This includes new rules and improvements to existing ones:- Added new
react/jsx-no-useless-fragment
rule witherror
level (introduced inv7.15.0
) that disallows unnecessary fragments. - Added the new
static-variables
option to thereact/sort-comp
rule (introduced inv7.15.0
). - Added new
react/jsx-newline
rule (introduced inv7.22.0
) and disable by default. - Added new
react/jsx-no-constructed-context-values
rule (introduced inv7.22.0
) and enabled it by default to prevent react contexts from taking non-stable values.React Context, and all its child nodes and Consumers are rerendered whenever the value prop changes. Because each Javascript object carries its own identity, things like object expressions (
{foo: "bar"}
) or function expressions get a new identity on every run through the component. This makes the context think it has gotten a new object and can cause needless rerenders and unintended consequences.
This can be a pretty large performance hit because not only will it cause the context providers and consumers to rerender with all the elements in its subtree, the processing for the tree scan react does to render the provider and find consumers is also wasted. - Added
enforceDynamicLinks
option with valuealways
forreact/jsx-no-target-blank
rule (introduced inv7.9.0
) - Added
react/no-unstable-nested-components
rule and enabled it by default to prevent creating unstable components inside components.Creating components inside components without memoization leads to unstable components. The nested component and all its children are recreated during each re-render. Given stateful children of the nested component will lose their state on each re-render.
React reconcilation performs element type comparison with reference equality. The reference to the same element changes on each re-render when defining components inside the render block. This leads to complete recreation of the current node and all its children. As a result the virtual DOM has to do extra unnecessary work and possible bugs are introduced. - Added
forbidDefaultForRequired
option with valuetrue
forreact/require-default-props
rule (introduced inv7.5.0
)
- Added new
- eslint-plugin-react-hooks — Bumped minimum version from
v2.0.0
tov4.2.0
.
@arcticicestudio/eslint-config-base
- confusing-browser-globals — Bumped minimum version from
v1.0.8
tov1.0.10
. - eslint-find-rules — Bumped version from
v3.4.0
tov3.6.1
. - eslint-plugin-import — Bumped minimum version from
v2.18.2
tov2.22.1
.
@arcticicestudio/eslint-config-typescript
- @typescript-eslint/eslint-plugin — Bumped minimum version from
v2.0.0
tov4.20.0
. - @typescript-eslint/parser — Bumped minimum version from
v2.0.0
tov4.20.0
. - typescript — Bumped minimum version from
v3.5.3
tov4.2.3
.
Improvements
Migrate to "tmpl" template repository — #35 ⇄ #36 (⊶ e6709a9)
↠ Migrated the project setup, structure and development workflow from version 0.9.0 of the “tmpl“ template repository.
Additionally specific assets like the repository hero image have been replaced and documentations like the README and GitHub issue/PR templates have been adjusted.
Move ESLint Prettier support into base package — #37 ⇄ #38 (⊶ a50130e)
↠ Before eslint-plugin-prettier and its corresponding eslint-config-prettier package were supported by the @arcticicestudio/eslint-config rule preset package. This worked fine for most projects, but also pulled in React specific dependencies like eslint-plugin-react and eslint-plugin-jsx-a11y.
To allow to use Prettier without @arcticicestudio/eslint-config
, the support has been moved into the @arcticicestudio/eslint-config-base
package, including the optional entry point.
Tasks
Node.js package dependency & GitHub action version updates — #24, #23, #33 ⇄ #27, #34
↠ Bumped outdated Node.js package dependencies and GitHub actions to their latest versions:
- #24 (⊶ c0c2253)
acorn
from 7.0.0 to 7.1.1 - #23 ⇄ #27 (⊶ e015dc0)
eslint-plugin-react-hooks
from1.7.0
to2.0.0
. - #33 ⇄ #34 (⊶ e4fd165) Updated to ESLint v7 — bumped package version from
v6.2.0
tov7.23.0
. See #32 and the official v7 migration guide for more details. - #33 ⇄ #34 (⊶ e4fd165) Removed
--ext
option for ESLint tasks — as of ESLint v7, files matched byoverrides[].files
are now linted by default which makes it obsolete to explicitly define file extensions like*.js
. - #33 ⇄ #34 (⊶ e4fd165) del-cli — bumped minimum version from
v2.0.0
tov3.0.1
. - #33 ⇄ #34 (⊶ e4fd165) eslint-config-prettier — bumped version from
v6.1.0
tov8.1.0
. - #33 ⇄ #34 (⊶ e4fd165) eslint-plugin-prettier — bump minimum version from
v3.1.0
tov3.3.1
. - #33 ⇄ #34 (⊶ e4fd165) eslint-plugin-import — bumped minimum version from
v2.18.2
tov2.22.1
. - #33 ⇄ #34 (⊶ e4fd165) husky — bumped minimum version from
v3.0.4
tov6.0.0
. This also includes some breaking changes that require migrations. Run the official migration CLI to automatically migrate from v4 to v6:npx husky-init && npm exec -- github:typicode/husky-4-to-6 --remove-v4-config
- #33 ⇄ #34 (⊶ e4fd165) lint-staged — bumped minimum version from
v9.2.3
tov10.5.4
. - #33 ⇄ #34 (⊶ e4fd165) prettier — bumped minimum version from
v1.18.2
tov2.2.1
. - #33 ⇄ #34 (⊶ e4fd165) remark-cli — bumped minimum version from
v7.0.0
tov9.0.0
.
GitHub Flow migration — #39 ⇄ #40 (⊶ 70b81fc)
Subtask of svengreb/styleguide-git#9
↠ Adapted to GitHub Flow like documented in detail in the main task issue svengreb/styleguide-git#9.
From master
to main
— #45 ⇄ #46 (⊶ 2ba56fb)
Subtask of svengreb/styleguide-git#11
↠ Adapted to the default branch renaming from master
to main
like documented in detail in the main task issue svengreb/styleguide-git#11.
The full changelog is available in the repository
Copyright © 2016-present Sven Greb