1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
Oscar Hinton
dfc640d365 Enable more angular-eslint rules (#17383) 2025-11-14 12:28:37 +01:00
Andreas Coroiu
1264abfb19 [PM-25569] Expose commercial sdk service to web clients (#16899)
* feat: enable commercial SDK usage on web

* feat: enable commercial SDK usage in cli

* feat: enable commercial SDK usage in browser

* feat: add lint to restrict commercial sdk imports
2025-10-31 08:13:36 +01:00
Oscar Hinton
d85b9986d0 [CL-901] [CL-903] Unowned - Prefer signal & change detection (#16949) 2025-10-29 13:42:19 -05:00
Oscar Hinton
8a8076a6da Enable warning for new angular linting (#16951) 2025-10-21 15:27:37 +02:00
Oscar Hinton
aa12700ebc Forbid non tailwind classes in browser (#16902)
Enables the non tailwind eslint rule to ensure we don't accidentally add any bad classes to our browser extension.

- Notification bar uses a custom CSS file and is excluded.
- Removed unused `UserVerificationComponent`.
2025-10-21 02:32:55 +02:00
Vicki League
b9edd453ba [CL-874] Replace or ignore hardcoded colors in svgs (#16871)
* [CL-874] Replace or ignore hardcoded colors in svgs

* missed the logo color remaining in dark mode

* set svg color lint rule to error

* add bw blue color
2025-10-18 16:46:24 -04:00
Mark Youssef
a4a53e27d4 [CL-616][CL-670] first pass at responsive updates to vault (#14588) 2025-10-08 10:04:39 -07:00
Will Martin
22cf55a23f [CL-846] forbid hardcoded colors in svg (#16167)
* add eslint rule to prevent hardcoded colors in svgs

* add tests

* warn instead of error for now
2025-09-10 22:22:39 -04:00
Bryan Cunningham
4449d8baf6 [CL-689][CL-799] Fix Icon button a11y errors (#15750)
* Throw error if appA11yTitle is null in icon button

* Add required label input

* Fix icon button errors in CL components and storeis

* fix popover aria-label errors

* remove commented code

* add labels to icon buttons in browser

* add labels to icon buttons in web

* add labels to icon buttons in license

* add labels to icon buttons in send

* add labels to icon buttons in angular

* fix missing pipe error

* fix sso icon button missed in error

* update labels in vault

* add section expand button label

* Adding labels to icon buttons

* Add lint rule to not allow icon buttons without label input

* rename util file

* trigger updates on title change

* update eslint rule name and folder

* add edit collection label to vault headers

* fix web header story label

* add show/hide summary labels

* update summary message

* fix breadcrumbs label message

* fix JSDoc to use correct input

* remove commented code

* use label as aria-label always. Remove init function

* add moreBreadcrumbs translation message to other apps

* add @bitwarden/team-ui-foundation as code owner for component eslint rules

* switch title to const variable

* add jsdoc comment on what the label input is used for

* [PM-22415] Tax ID notifications for Organizations and Providers (#15996)

* [NO LOGIC] Rename BillableEntity to BitwardenSubscriber

This helps us maintain paraody with server where we call this choice type ISubscriber. I chose BitwardenSubscriber to avoid overlap with RxJS

* [NO LOGIC] Move subscriber-billing.client to clients folder

* [NO LOGIC] Move organization warnings under organization folder

* Move getWarnings from OrganizationBillingApiService to new OrganizationBillingClient

I'd like us to move away from stashing so much in libs and utilizing the JsLibServicesModule when it's not necessary to do so. These are invocations used exclusively by the Web Vault and, until that changes, they should be treated as such

* Refactor OrganizationWarningsService

There was a case added to the Inactive Subscription warning for a free trial, but free trials do not represent inactive subscriptions so this was semantically incorrect. This creates another method that pulls the free trial warning and shows a dialog asking the user to subscribe if they're on one.

* Implement Tax ID Warnings throughout Admin Console and Provider Portal

* Fix linting error

* Jimmy's feedback

* remove duplicate messages keys

* revert changes to popover stories

* add back dupe myItems key for now as it was already here

* fix directive type errors

* remove variable left in error from merge conflict

* revert unintentional change to reports layout

* add back reports change

---------

Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
2025-08-19 15:15:41 -04:00
Oscar Hinton
22b8fc5f7d [CL-660] Forbid non tailwind classes from web and libs (#14422)
* Forbid non tailwind classes from web and libs

* Ignore vault filter section
2025-07-25 08:52:01 -07:00
Oscar Hinton
70ad4d048b [PM-22629] Forbid importing popup outside (#15168)
Adds an eslint rule forbidding non popup scripts from importing popups. Also added a webpack plugin that throws if it detects @angular inside background output.
2025-06-13 08:54:49 -05:00
Addison Beck
e8224fdbe3 feat(nx): add basic-lib generator for streamlined library creation (#14992)
* feat(nx): add basic-lib generator for streamlined library creation

This adds a new nx-plugin library with a generator for creating "common" type
Bitwarden libs. It is set up to accept a lib name, description, team, and
directory. It then
- Creates a folder in the directory (default to libs)
- Sets up complete library scaffolding:
  - README with team ownership
  - Build, lint and test task configuration
  - Test infrastructure
- Configures TypeScript path mapping
- Updates CODEOWNERS with team ownership
- Runs npm i

This will make library creation more consistent and reduce manual boilerplate setup.

The plugin design itself was generated by `npx nx g plugin`. This means we
used a plugin to generate a plugin that exports generators. To create our
generator generator, we first needed a generator.

* fix(dirt/card): correct tsconfig path in jest configuration

Fix the relative path to tsconfig.base in the dirt/card library's Jest config.
The path was incorrectly using four parent directory traversals (../../../../)
when only three (../../../) were needed to reach the project root.

* chore(codeowners): clarify some nx ownership stuff
2025-06-05 14:20:23 -04:00
Oscar Hinton
2fbc4c1578 [CL-525] Upgrade angular to v19 (#14815)
Upgrade Angular to v19 using the update guide.

- Add `standalone: false` to any missed component in stories or tests.
- Update jest.config to follow the new best practices.
2025-06-02 13:13:31 -04:00
Oscar Hinton
5423ab3268 [PM-21934] Upgrade to eslint 9 (#14754)
Upgrades to Eslint v9. Since this is a major version there were breaking changes, but since we've previously migrated to flat configs in #12806 those were minimal.
2025-05-27 13:13:15 -04:00
Addison Beck
56a3b14583 Introduce eslint errors for risky/circular imports (#14804)
* first draft at an idea dependency graph

* ignore existing errors

* remove conflicting rule regarding internal platform logic in libs

* review: allow components to import from platform
2025-05-23 08:01:25 -04:00
Patrick-Pimentel-Bitwarden
0b0397c3f0 fix(enums-eslint): Enum Rule for ESLint (#14650)
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.

* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.

* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.

* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
2025-05-13 10:07:38 -04:00
Thomas Rittson
ef72f513b1 eslint: report unused disable directives (#13463)
Remove any unused disable directives and FIXMEs in our code
2025-03-10 09:33:08 -04:00
Andreas Coroiu
d7c46bb3a5 [PM-16231] Improved SDK referencing (#12475)
* feat: implement Rc

* feat: use Rc in sdk service

* docs: add an example to `take()`

* fix: clarify function doc

* Add custom eslint rule package with enforced `using` rule (#13009)

* feat: add custom eslint rule

* feat: check for `UsingRequired` instead of hardcoding `Rc`

* chore: move package to libs

* wip: add tests. Tests work when run from same folder but not from root

* fix: add dependencies to renovate

* fix: add empty ts file to avoid typechecking throwing errors

* fix: tests not running from root

* chore: remove unecessary config

* fix: linting

* docs: add readme

* chore: add platform ownership

* chore: clean up comment

* Add support for flat config to "Improved sdk referencing" (#13054)

* WIP flat config for eslint

* Add rxjs

* Configure vscode to use flat config

* Fix some new linting errors

* Remove directory overrides of .eslintrc

* Remove explicit dependencies on typescript-eslint/ and @angular-eslint/

* Add missing rules

* Add rxjs recommended rules

* Add storybook and enabled rxjs-angular rule

* Add buildNoRestrictedImports helper

* Ignore platform import restrictions

* Remove unused ignores

* feat: migrate rules over to .mjs and flat config

* feat: implement support for .mjs tests

* chore: remove old package approach

* chore: update package-lock

* fix: add empty TS file to stop errors

* chore: clean up comments

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>

* fix: update CODEOWNERS to match folder name

* fix: renovate.json after merge

* fix: package.json, pin versions, sort order

* fix: update package-lock.json

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>
2025-02-03 15:09:25 +01:00
Oscar Hinton
70ea75d8f7 [PM-17496] Migrate eslint to flat config (#12806)
The legacy config is deprecated and will be removed in eslint 10. The flat config also allows us to write js functions which will assist in handling limitations with multiple identical rules.
2025-01-28 16:40:52 +01:00