feat(plugin): allow some one-line arrow functions (#172)
This commit is contained in:
@@ -40,6 +40,11 @@ export default createEslintRule<Options, MessageIds>({
|
||||
return
|
||||
if (declaration.id.typeAnnotation)
|
||||
return
|
||||
if (
|
||||
declaration.init.body.type !== 'BlockStatement'
|
||||
&& declaration.id?.loc.start.line === declaration.init?.body.loc.end.line
|
||||
)
|
||||
return
|
||||
|
||||
const arrowFn = declaration.init
|
||||
const body = declaration.init.body
|
||||
|
||||
Reference in New Issue
Block a user