eslint-plugin-node icon indicating copy to clipboard operation
eslint-plugin-node copied to clipboard

Distinction between recommended-module/script does not work with nested config

Open ZauberNerd opened this issue 5 years ago • 1 comments

We have a monorepo with yarn workspaces and one of the packages contains "type": "module". This isn't properly detected for files linted in that package, because the getPackageJson function always reads the root package.json https://github.com/mysticatea/eslint-plugin-node/blob/c833e11ebd50515142cfd4988674a6615833ed03/lib/configs/recommended.js#L8-L12

ZauberNerd avatar May 23 '20 12:05 ZauberNerd

You are right. The config is determined before iterating files, so we cannot switch shareable configs for each file. Please use overrides section and plugin:node/recommended-module / plugin:node/recommended-script to configure for your repo.

mysticatea avatar Jun 08 '20 09:06 mysticatea