IanVS / eslint-nibble

Ease into ESLint, by fixing one rule at a time
MIT License
787 stars 29 forks source link

Avoid strictive rules using `eslint-nibble` #92

Closed brunolnetto closed 2 years ago

brunolnetto commented 2 years ago

Hi Ian,

I am pleased to endorse this package. ESLint is a necessary package. On available packages, the errors are not easy to treat one by one. At this moment, I fix all my lint-ycal issues.

I would like to ask/suggest a feature: given the .eslintrc config file, how is it possible to avoid some specific rule by using eslint-nibble? Typically, as seen below, eslint extends some specific indentation style in my case 'airbnb-base'. Sometimes there is a rule one wants to avoid because it is too strict, for example, the camelcase rule on the image below.

module.exports = {
  env: {
    browser: true,
    es2021: true,
  },
  extends: [
    'airbnb-base',
  ],
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
  },
  rules: {
  },
};

image

IanVS commented 2 years ago

Hi, are you asking how to configure eslint to ignore that rule, or only eslint-nibble? There's no way to hide it from eslint-nibble only, but you can turn it off in your eslint config in the rules section, like this:


rules: {
  camelcase: "off",
}
brunolnetto commented 2 years ago

Nice! I am very pleased to use the library. Thank you!