4 ms·
The weird hostile attitude ESLint has about using global config really bums me out. Not everyone wants to install ESLint in every package.json. I work in more t
by suzzer99 2y ago
The weird hostile attitude ESLint has about using global config really bums me out. Not everyone wants to install ESLint in every package.json. I work in more than 30 active repos. I want global eslint to just work for most of them, and specific ESLint to work for a few. This used to work fine, now it doesn't.
https://eslint.org/docs/latest/use/getting-started https://eslint.org/docs/latest/use/getting-started
> It is also possible to install ESLint globally, rather than locally, using npm install eslint --global. However, this is not recommended, and any plugins or shareable configs that you use must still be installed locally if you install ESLint globally.
Which means that simple stuff like just adding the airbnb or eslint recommended settings can now only be done locally.
More discussion here: https://github.com/eslint/eslint/issues/11914 https://github.com/eslint/eslint/issues/11914
And here: https://github.com/jsx-eslint/eslint-plugin-react/issues/2339 https://github.com/jsx-eslint/eslint-plugin-react/issues/233...
Not everyone works on giant teams where global settings that aren't part of the project become a nightmare for compatibility. We have a very small team with often just one developer doing most of the work on a project.
- elondaits 2y agoWith JetBrains IDEs (e.g. Webstorm) it’s posible to point the IDE to a central installation of ESlint (independent from the project you’re working on). I use that for smaller projects where I don’t want to include a full installation of ESLint within the list of dependencies.
- suzzer99 2y agoYeah I'm an old dinosaur still on SublimeText. For me, quickly searching across all my repos is the most important feature, and I like Sublime's search the best. Also I have so many keyboard shortcuts memorized to where I couldn't even tell the shortcut, my hands just do it on command.
- thiht 2y ago> Not everyone wants to install ESLint in every package.json I don’t understand why? Adding the config to the repo takes minutes, and then you’re good: it’s shared with all the contributors and can work in CI. Not sure why you would want to settle for "works on my machine"?
- suzzer99 2y ago1. It slows down CICD install times for every repo. 2. I'd rather not have to make the same ESLint config change to 30+ repos. 3. I'd rather not have to update ESLint plus plugins in 30+ package.json files.' We don't use ESLint as any kind of CICD gateway and we don't enforce what IDE/linter people use. It's not important to us to have perfect uniformity across every developer's machine.
- suzzer99 2y agoI just added fetch to my globals array in my global .eslintrc file and I didn't have to add it to 29 other repos. That was nice.