question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why are documents that confusing and options setting that hard to set?

See original GitHub issue

I was trying to set the max chars per line but the document is very confusing and did not clearly tell me what to set in .eslintrc.json

I eventually found the way to set it outside of the official doc but the way to set it is very strange.

"max-len": [
            2, 180, 4
        ]

I can’t find the document about what is 2 and what is 4. What is going on?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Jun 17, 2017

I think there are two different issues here.

  1. Rule documentation assumes that users are familiar with how to set severity of rules and do not mention that severity is the first argument for rule configuration (because that’s covered in the Configuration page).
  2. Some rules’ options might not be clear. We’ve tried to avert this in more recent rules by always using an object option, so that object keys can help explain what the option is. Some of our older rules use an array of options instead, so users have to understand the positional aspect of the options, which isn’t useful.

The first issue could be fixed by updating site generation to add a quick paragraph about rule severity into each rule (just a very quick reference about off/warn/error and 0/1/2 but then link to the relevant section in Configuring docs).

The second issue, in the particular case of max-len, could be fixed by expanding the schema to support an object option. At the very least, I think the tab width option should be in an object (I think the line length wouldn’t have to be in the object since that should be a fairly obvious configuration setting). We could also potentially deprecate the positional option style and recommend the new approach in docs.

0reactions
not-an-aardvarkcommented, Jul 2, 2017

Closing because this is working as intended.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What are the meaning of 3 options under "Choose what to keep"
I am in a confusion about the options in this step: Keep Windows settings, personal files, and apps; Keep personal files only; Nothing....
Read more >
How to fix the 7 most common glitches in technical writing
1. Messy structure. Many technical documents confuse readers and fail to achieve their aims because they were not planned properly to begin with....
Read more >
Managing Files and Directories Flashcards | Quizlet
Study with Quizlet and memorize flashcards containing terms like File Management, File Extensions, Organizing Files and more.
Read more >
Microsoft Makes Windows 10 Recovery Options Slightly Less ...
As I've documented in the Windows 10 Field Guide, Microsoft offers far too many recovery options in Windows 10. But with Windows 10...
Read more >
The Confusing Story Of OneDrive Files On-Demand
OneDrive is getting a major new feature but it's hard to predict when you'll get it, it's confusing to set up, and it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found