fictivekin / eslint-config-fk

MIT License
0 stars 0 forks source link

eslint:recommended rules not being applied #1

Closed desandro closed 3 years ago

desandro commented 3 years ago

@jacobfentress I just discovered the rules from eslint:recommended are not being applied. In particular, I had an undefined variable that was not caught as no-undef was not set.

Turns out that extending the google config enables Google's rules, but it does not extend eslint:recommended itself.

There are several rules in the eslint:recommended ruleset that Google style is not opinionated about that you might want to enforce in your project.

Solution 1 - extend eslint:recommended in our index.js

// @fictivekin/eslint-config-fk/index.js
  "extends": [
    "eslint:recommended",
    "google"
  ],

Solution 2 - Edit README to recommend extending eslint:recommended also side usage of @fictivekin/eslint-config-fk in project ESLint config

// README json example
"eslintConfig": {
    "extends": [
      "eslint:recommended",
      "@fictivekin/eslint-config-fk"
    ]
}

LMK how you'd like to proceed.

jakefentress commented 3 years ago

@desandro oooh, that's a great catch.

Personally, I'm ok with either solution. If there is one you feel better about, please run with it. Let me know when if you update the index.js of this project (and when you're ready) and I'll be happy to bump the version on npm.

desandro commented 3 years ago

I recommend Solution 1 - extend eslint:recommended in our index.js. This feels more fool-proof. I'd say it would require a major version bump as lots of other errors could be thrown by eslint once enabled.

I'd do it myself, but looks like I need push access

jakefentress commented 3 years ago

oof. You should have push access, now.

desandro commented 3 years ago

Pushed. Looks like you'll have to do the npm publish