Eslint Disable Max Len

November 3, 2017

Edit .eslintrc.js file in your project folder, add 'max-len': 0 in the rules section.

Based on ESLint Configuring Rules:

  • “off” or 0 - turn the rule off
  • “warn” or 1 - turn the rule on as a warning (doesn’t affect exit code)
  • “error” or 2 - turn the rule on as an error (exit code is 1 when triggered)
// http://eslint.org/docs/user-guide/configuring

module.exports = {
  ...
  // optional: you can use https://www.npmjs.com/package/eslint-config-airbnb
  extends: 'airbnb-base',
  ...
  // add your custom rules here
  'rules': {
    'max-len': 0
  }
}

If you want to enable max-len linting

// warn, maximum length of 80, tab width 4
max-len: [1, 80, 4]
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.