'ESLint Configuration File - indicated in cousin folder

I am trying to add an eslint configuration to my project. I do not want to add it in the root folder but in the .vscode one.

I have the following folder structure :

my-poney-project
├── .vscode
│ └── my-poney-project.code.workspace
│ └── .eslintrc.json
├── lib
│ └── source.js
└─┬ tests
  └── test.js

and I want to lint file which are present in the lib and tests folder, with the eslint configuration in the .vscode folder.

Currently my my-poney-project.code.workspace file contains the following :

{
    "folders": [{
        "path": ".."
    }],
    "settings": {
        "eslint.alwaysShowStatus": true,
        "eslint.debug": true,
}

Do you know how could I indicate to eslint to use the .vscode\.eslintrc.json whereas it is not in a parent folder of the files I am trying to lint (lib and test)? For example, is there a parameter to add in the my-poney-project.code.workspace ?

References which may be related to this question :

I would be grateful for any comments or responses, Cheers !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source