-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
refactor: Unify eslint config, convert to flat configs and update plugins (WIP) #30892
base: develop
Are you sure you want to change the base?
Conversation
{ | ||
// rules that are gold standard, but have many violations | ||
// these are off while developing eslint, but will be set to warn | ||
rules: { |
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 should be ordered by:
- originating ruleset (
cypress/
beforereact/
, etc) - impact of not fixing the rule.: rules that help prevent runtime errors or bugs should be prioritized over more superficial rules.
|
"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 Run #59942
Run Properties:
|
Project |
cypress
|
Branch Review |
eslint-stylistic
|
Run status |
Failed #59942
|
Run duration | 12m 26s |
Commit |
3a27427564: ignore .d.ts files in system-tests
|
Committer | Cacie Prins |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
134
|
Flaky |
0
|
Pending |
99
|
Skipped |
54
|
Passing |
3454
|
View all changes introduced in this branch ↗︎ |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
41.86%
|
|
---|---|
Untested elements |
72
|
Tested elements |
54
|
Accessibility
95.19%
|
|
---|---|
Failed rules |
0 critical
4 serious
0 moderate
0 minor
|
Failed elements |
165
|
Tests for review
The first 5 failed specs are shown, see all 1184 specs in Cypress Cloud.
Additional details
This is a first step to working towards our Typescript north star.
The big, structural changes:
npm/eslint-plugin-dev
is removed. The custom rules defined there are available fromeslint-plugin-cypress
andeslint-plugin-mocha
, or were ignored in places they would have applied.eslint-stylistic
is used for formatting rules that were deprecated. We should consider moving the prettier, but this is a good first step.Benefits:
eslint-plugin-cypress
Some drawbacks:
graphql
that the repo and some of its other related dependencies require. Upgradinggraphql
is out of scope for the forseeable future - it will require an enormous reworking ofpackages/data-context
andpackages/graphql
. Because this area of the code isn't currently modified very often, I think this is an okay tradeoff..vue
file. This will increase CI times for linting in several of our packages. See: Very slow with typescript-eslint parser andproject
vuejs/vue-eslint-parser#65Todo:
typescript-eslint
parses.js
files too, so that enabling recommended typings goes smoother -ts
files that importjs
files can get some modicum of checking.tsconfig.json
files in theircypress/
and/ortest/
directories. This is to helptypescript-eslint
'sprojectServer
functionality determine which files should be included or excluded from the project (and thus linting)eslint.config.ts
files may have redundancies with thebaseConfig
in the rooteslint.config.ts
file. These are from partial application of DRY's "rule of three," and can probably be removed.--fix
ed 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
?