Setting rules 'max-classes-per-file' in my angular project. Error trigger by ESLint is '"File has too many classes"

Viewed 1761

A bit new to linting, I'm trying to set a global rule "max-classes-per-file" in eslintrc.json file to turn off eslint error "File has to many classes". Trying to define the rule directly in the file works fine, but I'm really trying to set it globally.

I might be defining that rules incorrectly because it does not impact my file.

My definition:

...
rules: {
'max-classes-per-file': 'off',
}

Any help would be greatly appreciated.

Thank you in advance.

2 Answers

Mea culpa, I simply didn't pay attention. After closing the file and reopening it, the linting rule applied accordingly

error in " instead of ' and false instead of off

  "rules": {
    "max-classes-per-file": false    
  },

More info - max-classes-per-file

Related