Repository navigation
chore(angular): use Ionic lint and Prettier configs and add Playwright e2e tests - #1916
Draft
brandyscarney wants to merge 1 commit into
Draft
brandyscarney wants to merge 1 commit into
brandyscarney wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What This Does
Brings the
angular-standalonestarters in line with the Ionic tutorial app (tutorial-photo-gallery-angular), so an app created withionic starthas the same lint, formatting, and test setup the tutorials teach against.New Behavior
Apps generated from the Angular standalone starters now:
@ionic/eslint-configalongsideangular-eslint, including its template accessibility rules. They format.tsand.htmlfiles with Prettier and@ionic/prettier-config.npm run lintchecks both andnpm run lint:fixfixes both.e2e/.lint,lint:fix,test,test:unit,test:unit:watch, andtest:e2e.npm testruns unit tests once, then e2e. It no longer starts Vitest in watch mode.Changes
base:eslint.config.jsnow uses@ionic/eslint-configwithangular-eslint..prettierignore(skipsandroid/andios/).playwright.config.ts..gitignore.@ionic/eslint-config,@ionic/prettier-config,@playwright/test, andprettier.angular.json:vitest.config.mts, which turns off Vitest's file-system module cache. With Angular's builder, that cache could serve a stale bundle after a non-spec file changed.citest configuration, sincetest:unitruns once.ng lintnow also lintse2e/andplaywright.config.ts.e2e/app.spec.tsto each.import typefor type-only imports.HomePage.refreshin the list template.ionic.starter.jsontest script now runs lint, build, unit tests, then Playwright e2e.Notes
npm run starters:testfor all four templates.ionic generate pagestill fail the new lint rules (a non-typeOnInitimport and an emptyngOnInit()). That comes from@ionic/angular-toolkit's template and needs a fix there.