this is question is basically a variant of dependencies vs. devDependencies
, I am looking through some source code these days, most of monorepo project will have a eslint-config
to do lint
what confuses me is that they all put the eslint-plugin into dependencies
not devDependencies
for example, a eslint config package called eslint-config
, here's package.json
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"eslint-config-standard": "17.0.0-1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsonc": "^2.2.1",
"eslint-plugin-n": "^15.0.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-unicorn": "^41.0.1",
"eslint-plugin-vue": "^8.5.0",
"eslint-plugin-yml": "^0.14.0",
"jsonc-eslint-parser": "^2.1.0",
"yaml-eslint-parser": "^0.5.0"
},
"devDependencies": {
"eslint": "^8.11.0"
},
we of course use it by npm i eslint-config -D
, so I wonder if the eslint config get removed after bundled(I think it's 100% get removed), but I want to know the behand philosophy