Skip to content

Commit d651a81

Browse files
Syncpack: ban classnames from being reintroduced (#79061)
Gutenberg standardised on `clsx` in 2024 ([#61138]) and removed every `classnames` declaration across the monorepo. There is currently no guardrail preventing it from being re-added later — an `npm install classnames` in any workspace would land silently. Add a `Banned` version group to `syncpack.config.mjs` that fails `lint:deps` (and CI) on any declaration of `classnames` in any package.json. The rule is preventive: no current declarations are affected. Picked up as the follow-up suggested in #77950's review. [#61138]: #61138 Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
1 parent 4d73673 commit d651a81

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

syncpack.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export default {
77
packages: [ '**' ],
88
isIgnored: true,
99
},
10+
{
11+
label: 'Banned dependencies that should not be reintroduced.',
12+
dependencies: [ 'classnames' ],
13+
packages: [ '**' ],
14+
isBanned: true,
15+
},
1016
{
1117
label: 'peerDependencies use intentionally wide ranges; only enforce that the ranges are mutually satisfiable.',
1218
dependencyTypes: [ 'peer' ],

0 commit comments

Comments
 (0)