eslint-plugin-node
eslint-plugin-node copied to clipboard
Distinction between recommended-module/script does not work with nested config
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
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.