-
Notifications
You must be signed in to change notification settings - Fork 3.4k
refactor: Unify eslint config, convert to flat configs and update plugins (WIP) #30892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // thus set all settings to disable accidentally running Prettier | ||
| // this project only uses Prettier for json files | ||
| "prettier.requireConfig": true, | ||
| "prettier.disableLanguages": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these options are no longer valid in vscode
| @@ -1,8 +1,17 @@ | |||
| { | |||
| "private": true, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was re-sorted by prettier-package-json https://www.npmjs.com/package/prettier-package-json
cypress
|
||||||||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
eslint-stylistic
|
| Run status |
|
| Run duration | 12m 58s |
| Commit |
|
| Committer | Cacie Prins |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
131
|
|
|
1
|
|
|
763
|
|
|
54
|
|
|
5635
|
| View all changes introduced in this branch ↗︎ | |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
41.1%
|
|
|---|---|
|
|
94
|
|
|
67
|
Accessibility
95.16%
|
|
|---|---|
|
|
0 critical
4 serious
0 moderate
0 minor
|
|
|
259
|
Tests for review
The first 5 failed specs are shown, see all 1355 specs in Cypress Cloud.
src/navigation/SidebarNavigation.cy.tsx • 1 flaky test • app-ct
| Test | Artifacts | |
|---|---|---|
| SidebarNavigation > expands the bar when clicking the expand button |
Test Replay
Screenshots
|
|
| /.nx/workspace-data | ||
|
|
||
| !**/*.json | ||
| **/package.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to ignore package.json? Are there prettier rules we could use to standardize these?
|
Additional details
This is a first step to working towards our Typescript north star.
The big, structural changes:
npm/eslint-plugin-devis removed. The custom rules defined there are available fromeslint-plugin-cypressandeslint-plugin-mocha, or were ignored in places they would have applied.eslint-stylisticis used for formatting rules that were deprecated. We should consider moving the prettier, but this is a good first step.Benefits:
eslint-plugin-cypressSome drawbacks:
graphqlthat the repo and some of its other related dependencies require. Upgradinggraphqlis out of scope for the forseeable future - it will require an enormous reworking ofpackages/data-contextandpackages/graphql. Because this area of the code isn't currently modified very often, I think this is an okay tradeoff..vuefile. This will increase CI times for linting in several of our packages. See: Very slow with typescript-eslint parser andprojectvuejs/vue-eslint-parser#65Todo:
typescript-eslintparses.jsfiles too, so that enabling recommended typings goes smoother -tsfiles that importjsfiles can get some modicum of checking.tsconfig.jsonfiles in theircypress/and/ortest/directories. This is to helptypescript-eslint'sprojectServerfunctionality determine which files should be included or excluded from the project (and thus linting)eslint.config.tsfiles may have redundancies with thebaseConfigin the rooteslint.config.tsfile. These are from partial application of DRY's "rule of three," and can probably be removed.--fixed will likely result in very large diffs, so switching them on may warrant additional PRs.Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?