Here is the organization of my files and directories.
https://i.stack.imgur.com/YWNw3.png
I am looking to set up some eslint rules for my code detection.
In my .eslintrc
file, I have included these configuration settings.
{
"extends": "airbnb",
"rules": {
"valid-jsdoc": 2,
// Disable until Flow supports let and const
"no-var": 0,
"react/jsx-uses-react": 1,
"react/jsx-no-undef": 2,
"react/wrap-multilines": 2,
"func-names": 0,
"new-cap": 0,
"no-undef": 0,
},
"plugins": [
"react"
]
}
I am using npm scripts to execute eslint.
"scripts": {
"lint": "eslint src"
},
Typically, running npm run lint
would analyze all the files in the src
directory.
However, no output is generated.
https://i.stack.imgur.com/ZIiKw.png
I am unsure why. My initial thought was that maybe there are mistakes in the configuration settings. But when I specified a single file in the npm script
"lint": "eslint src/component/App.jsx"
, eslint worked as expected.
So, what seems to be the issue? Eslint can detect individual files properly, but encounters difficulties with analyzing all files within a specific directory.