Your best bet is to create a reproducible case in the demo ( https://eslint.org/demo) and then open a discussion ( https://github.com/eslint/eslint/discussions) to give more context. It's difficult to know what's going on with just a snippet.
Thanks. On Wed, May 18, 2022 at 11:24 AM Joseph Carneiro <[email protected]> wrote: > I'm wondering if it has anything to do with the typing. The test function > is typed as jest.ProvidesCallback which seems to be why the rule doesn't > apply. > > On Wednesday, May 18, 2022 at 2:15:41 PM UTC-4 Joseph Carneiro wrote: > >> What I mean is that it's not showing up as an error even though this >> could be re-written with the concise syntax. >> >> On Wednesday, May 18, 2022 at 12:35:22 PM UTC-4 [email protected] >> wrote: >> >>> Can you explain what you mean by "does not apply"? >>> >>> ESLint rules aren't context-aware, so the rule has no idea that you're >>> using Jasmine. >>> >>> On Tue, May 17, 2022 at 1:35 PM Joseph Carneiro <[email protected]> >>> wrote: >>> >>>> Hey, everyone, >>>> >>>> I noticed when using "arrow-body-style": ["error, "as-needed"] that >>>> the rule does not apply to Jasmine it test closures. For example: >>>> >>>> it('should be created', () => { >>>> expect(service).toBeTruthy(); >>>> }); >>>> >>>> Should be an error, but the linter is silent. Does anyone have any >>>> idea why this is the case? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "ESLint" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/eslint/2a0a03bd-193b-4351-ab77-69099efa06f9n%40googlegroups.com >>>> <https://groups.google.com/d/msgid/eslint/2a0a03bd-193b-4351-ab77-69099efa06f9n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "ESLint" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/eslint/42605781-009e-4339-83ce-fe8bb59534acn%40googlegroups.com > <https://groups.google.com/d/msgid/eslint/42605781-009e-4339-83ce-fe8bb59534acn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/eslint/CAOkd9hnaTrua44zEc89W1UhEiQfeuPw_kG_BRGM_LrsYgCC_%3Dw%40mail.gmail.com.
