-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
ci(eslint): add @cspell/eslint-plugin to prevent misspelling (error) #6718
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 36aa021. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 36aa021:
|
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 comment was caught by cspell eslint. This rule will remove opportunity to use these misspelling
@@ -7,7 +7,7 @@ const ruleTester = new ESLintUtils.RuleTester({ | |||
settings: {}, | |||
}) | |||
|
|||
ruleTester.run('no-rest-desctructuring', rule, { | |||
ruleTester.run('no-rest-destructuring', rule, { |
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.
desctructuring -> destructuring
@@ -15,7 +15,7 @@ async function fetchData<TData>(value: TData, ms?: number): Promise<TData> { | |||
} | |||
|
|||
describe('dehydration and rehydration', () => { | |||
test('should work with serializeable values', async () => { | |||
test('should work with serializable values', async () => { |
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.
serializeable -> serializable
@@ -433,7 +433,7 @@ describe('queryClient', () => { | |||
).resolves.toEqual('bar') | |||
}) | |||
|
|||
test('should return the cached query data if the query is found and cached query data is falsey', async () => { | |||
test('should return the cached query data if the query is found and cached query data is falsy', async () => { |
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.
falsey -> falsy
@@ -245,7 +245,7 @@ describe('createPersister', () => { | |||
expect(query.fetch).toHaveBeenCalledTimes(1) | |||
}) | |||
|
|||
test('should store item after successfull fetch', async () => { | |||
test('should store item after successful fetch', async () => { |
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.
successfull -> successful
@@ -142,7 +142,7 @@ export function persistQueryClientSubscribe( | |||
} | |||
}) | |||
|
|||
const unusbscribeMutationCache = props.queryClient | |||
const unsubscribeMutationCache = props.queryClient |
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.
unusbscribeMutationCache -> unsubscribeMutationCache
@@ -2722,7 +2722,7 @@ describe('useQuery', () => { | |||
await waitFor(() => rendered.getByText('data: 1, isFetching: false')) | |||
}) | |||
|
|||
it('should calculate focus behaviour for `refetchOnWindowFocus` depending on function', async () => { | |||
it('should calculate focus behavior for `refetchOnWindowFocus` depending on function', async () => { |
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.
behaviour -> behavior
@@ -46,14 +46,14 @@ function reconcileFn<TData, TError>( | |||
return { ...result, data: newData } as typeof result | |||
} | |||
|
|||
type HydrateableQueryState<TData, TError> = QueryObserverResult<TData, TError> & | |||
type HydratableQueryState<TData, TError> = QueryObserverResult<TData, TError> & |
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.
HydrateableQueryState -> HydratableQueryState
@@ -170,7 +170,7 @@ export function createBaseQuery< | |||
reconcileOptions === undefined ? false : reconcileOptions, | |||
) | |||
}) | |||
// If the query has data we dont suspend but instead mutate the resource | |||
// If the query has data we don't suspend but instead mutate the resource |
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.
dont -> don't
@@ -325,24 +325,24 @@ describe('useQuery', () => { | |||
getCurrentInstanceSpy.mockImplementation(() => ({ suspense: {} })) | |||
|
|||
let afterTimeout = false | |||
const isEnabeld = ref(false) | |||
const isEnabled = ref(false) |
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.
isEnabeld -> isEnabled
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #6718 +/- ##
=======================================
Coverage 41.78% 41.78%
=======================================
Files 178 178
Lines 7017 7017
Branches 1421 1421
=======================================
Hits 2932 2932
Misses 3722 3722
Partials 363 363 ☔ View full report in Codecov by Sentry. |
'error', | ||
{ | ||
cspell: { | ||
words: [ |
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.
instead of keeping this list that long, could we not just replace some of these that are only used in tests or local variables with known words?
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.
I'll try it soon.
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.
I made it simpler than before in c8770ba
c2917ce
to
c8770ba
Compare
@@ -705,7 +707,7 @@ describe("useQuery's in Suspense mode", () => { | |||
expect(queryFn).toHaveBeenCalledTimes(1) | |||
}) | |||
|
|||
it('should error catched in error boundary without infinite loop', async () => { | |||
it('should error caught in error boundary without infinite loop', async () => { |
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.
catched -> caught
@@ -263,8 +263,8 @@ export function createBaseQuery< | |||
on( | |||
[isRestoring, observer], | |||
([restoring]) => { | |||
const unsub = unsubscribe | |||
queueMicrotask(() => unsub?.()) | |||
const _unsubscribe = unsubscribe |
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.
same internal variable name as _*
@@ -2859,7 +2859,7 @@ describe('useQuery', () => { | |||
const { status, error } = useQuery({ | |||
queryKey: key, | |||
queryFn: () => { | |||
return Promise.reject(new Error('Error test jaylen')) |
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.
I don't know jaylen, but I thought it as unnecessary string
@@ -196,7 +196,7 @@ describe('queryClient', () => { | |||
expect(() => { | |||
queryClient.setQueryData([key, user], (prevUser?: typeof user) => ({ | |||
...prevUser!, | |||
name: 'Edvin', | |||
name: 'James', |
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.
I thought James is general user name than Edvin
@@ -364,13 +364,13 @@ ruleTester.run('exhaustive-deps', rule, { | |||
const CONST_VAL = 1 | |||
function useHook() { | |||
const queryClient = useQueryClient() | |||
const kueryKlient = useQueryClient() |
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.
kuery -> query
@TkDodo check this again please |
@TkDodo
To resolve #6687 (comment)
This rule will make contributors use correct spelling and I left comment what misspelled words this rule catch