airbnb / airbnb/javascript

Line exceeds 100 characters and arrow body style

Open
#1,532 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
148k
Forks
26.6k
PR merge metrics
No merged PRs in 30d

Description

I have the following:

`export const filteredItems = (state, filter, value) => state.items.filter(item => item.filter === value);
`

which gives the max-len (100) error.

When I rewrite it by changing the arrow function to the version with { } , naturally I get the error: https://github.com/airbnb/javascript#arrows--implicit-return .

What's the way around this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the example in the issue and compare the max-len rule with the linked arrows--implicit-return guidance. Confirm whether the style guide needs clarification about wrapping this arrow expression; done means the accepted guidance is documented without conflicting rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
documentation, tooling
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.