-
Notifications
You must be signed in to change notification settings - Fork 40
chore: reorg eslint rules into separate files #466
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
Total lines changed 2553 is greater than 1000. Please consider breaking this PR down. |
@@ -99,7 +99,7 @@ export default class TestEnvironment extends NodeEnvironment implements JestEnvi | |||
type TestDescription = PartialBy<Pick<Circus.TestEntry, 'name' | 'parent'>, 'parent'>; | |||
|
|||
// Utility type to make specific fields optional | |||
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>> | |||
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>; |
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 wasn't picked up before because the default eslint semi
rules doesn't do TypeScript.
@@ -1,7 +1,7 @@ | |||
/** | |||
* @deprecated | |||
*/ | |||
export type Obj<T> = {[key: string]: T}; | |||
export type Obj<T> = { [key: string]: T }; |
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 wasn't picked up before because the default eslint key-spacing
rules doesn't do TypeScript.
@@ -25,7 +25,7 @@ export function cached<A extends object, B>(obj: A, sym: symbol, fn: () => B): B | |||
* @deprecated | |||
*/ | |||
export interface ContextProviderPlugin { | |||
getValue(args: {[key: string]: any}): Promise<any>; | |||
getValue(args: { [key: string]: any }): Promise<any>; |
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 wasn't picked up before because the default eslint key-spacing
rules doesn't do TypeScript.
cb48e59
to
5adcb38
Compare
Signed-off-by: github-actions <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #466 +/- ##
=======================================
Coverage 79.18% 79.18%
=======================================
Files 54 54
Lines 6912 6912
Branches 773 773
=======================================
Hits 5473 5473
Misses 1421 1421
Partials 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pr/exempt-integ-test to bypass unrelated integ test failure. This PR does not require integ testing since no functional code is changed. |
The rules file got a bit large and hard to maintain/understand what's going on. In this change we are splitting the file up into sensible categories.
Also includes a projen upgrade to uses
@stylistic
for formatting rules and fixes a couple of rules to not use an array when they prefer to not use one (based on VSCode eslint plugin warnings). Places where some of the affected rules are disabled needed updating as well.There are a bunch of small formatting changes to type statements. These didn't get picked up previously because the built-in eslint rules don't support TypeScript, but the
@stylistic
ones do.The lack of any other changes to the codebase proves that these fixes are alright.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license