Socket
Socket
Sign inDemoInstall

eslint-plugin-max-len-2

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-max-len-2

A secondary max-len rule, for soft limits.


Version published
Weekly downloads
24
decreased by-45.45%
Maintainers
1
Install size
1.41 kB
Created
Weekly downloads
 

Readme

Source

max-len-2 (eslint plugin)

Ref: https://github.com/eslint/eslint/issues/6910

Usually I have a soft-limit of 80 characters per line, and a hard-limit of 120 characters per line.

Since eslint rules cannot set the error level (warn/error) themselves, this copy of the built-in "max-len" rule (that comes with your own eslint installation), allows you to define soft and hard limits in your .eslintrc.yaml like this:

  max-len:
    - error
    - code: 120
      ignoreComments: true
      ignoreUrls: true
  max-len-2/max-len-2:
    - warn
    - code: 80
      ignoreComments: true
      ignoreUrls: true

License

MIT

Keywords

FAQs

Last updated on 19 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc