When i generate a new React Typescript application using the latest version 7 of the Ionic CLI, i am not seeing any eslint warnings for missing dependencies in any useEffect hooks that i add inside a component when viewing the project in VSCode.
I am using VSCode as my IDE with the ESLint extension installed.
I can confirm that older applications which were generated with version 6 or lower of the Ionic CLI do display warnings and offer a list of suggested dependencies to insert automatically.
Here is what i see in VSCode when viewing an older Ionic 6 application:
And below is what i see in a new Ionic 7 application for the same code, with no warnings:
My Ionic 6 app does not have an eslintrc configuration file, instead the only configuration i could find was in the package.json file:
...
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
...
In the Ionic 7 app, the Ionic CLI generated the following .eslintrc.js file:
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:react/recommended',
'eslint:recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
}
}
I am not well versed in configuring eslint to understand how to change or update the configuration that Ionic 7 uses in-order to get VSCode to display the same warnings that i see for the version 6 app and could really use some help.
I did try running npx eslint --init from the terminal, followed the prompts and installed the additional packages it suggested i needed but this did not work.
Subsequently, in VSCode, i tried running the command "ESLint: Restart ESLint Server" which did not work to correct the issue.
I also tried running the command "ESLint: Show Output Channel", which shows that ESLint is running without any errors.
Lastly, i tried following this 2023 guide, albeit likely that it was not meant for use in an application that was generated by the Ionic CLI, and needless to say, it was not a perfect fit and i could not get it to work.
Has anyone else run into this problem yet and found a fix?

