oxsecurity / megalinter

🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.89k stars 232 forks source link

Allow Eslint with config in package.json #1205

Closed vitaliytv closed 2 years ago

vitaliytv commented 2 years ago

Eslint can use config declared in package.json "eslintConfig"

https://eslint.org/docs/user-guide/configuring/

nvuillam commented 2 years ago

That's good, but we need to check if eslintConfig is present in json :) Maybe some format like filename[text] ex: package.json[eslintConfig] , and in the python code, detect when [ is present in a file name, and in that case :

This would be around here in the code -> https://github.com/megalinter/megalinter/blob/f687587ec8bccad9ffcce783932973453a465f82/megalinter/Linter.py#L250