Browse Source

[CL-660] Forbid non tailwind classes from web and libs (#14422)

* Forbid non tailwind classes from web and libs

* Ignore vault filter section
pull/15792/head
Oscar Hinton 5 months ago committed by GitHub
parent
commit
22b8fc5f7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      apps/web/src/app/vault/individual-vault/vault-filter/shared/components/vault-filter-section.component.html
  2. 20
      eslint.config.mjs

1
apps/web/src/app/vault/individual-vault/vault-filter/shared/components/vault-filter-section.component.html

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
<!-- eslint-disable tailwindcss/no-custom-classname -->
<ng-container *ngIf="filters && filters.length">
<div *ngIf="headerInfo.showHeader" class="filter-heading">
<button

20
eslint.config.mjs

@ -310,6 +310,26 @@ export default tseslint.config( @@ -310,6 +310,26 @@ export default tseslint.config(
"no-console": "off",
},
},
// Tailwind migrated clients & libs
{
files: ["apps/web/**/*.html", "bitwarden_license/bit-web/**/*.html", "libs/**/*.html"],
rules: {
"tailwindcss/no-custom-classname": [
"error",
{
// In migrated clients we only allow tailwind classes plus the following exceptions
whitelist: [
"((bwi)\\-?).*", // Font icons
"logo",
"logo-themed",
"file-selector",
"mfaType.*",
"filter.*", // Temporary until filters are migrated
],
},
],
},
},
/// Bandaids for keeping existing circular dependencies from getting worse and new ones from being created
/// Will be removed after Nx is implemented and existing circular dependencies are removed.
{

Loading…
Cancel
Save