Preflight issue-'Your ESLint config file .eslintrc.cjs does not match the configuration file template.'
varshabhadana opened this issue · comments
What happened?
As per the provide guidelines to setup SafeQL in our next.js e-commerce project I updated my Upleveled ESLint config.
CI=true npx install-peerdeps@latest --yarn --dev @upleveled/eslint-config-upleveled node node_modules/@upleveled/eslint-config-upleveled/scripts/install.js
I was getting 'ERR undefined after running the above code.
What was I trying to do? What did I expect to happen?
I followed the steps to disable SafeQL , commented out the code inside .eslintrc.cjs file and then installed ESLint config using the code below
yarn add @upleveled/eslint-config-upleveled@2.16.2 @babel/eslint-parser@7.19.1 @next/eslint-plugin-next@12.3.1 @ts-safeql/eslint-plugin@0.0.16 @types/node@18.8.1 @types/react@18.0.21 @types/react-dom@18.0.6 @typescript-eslint/eslint-plugin@5.39.0 @typescript-eslint/parser@5.39.0 @upleveled/eslint-plugin-upleveled@2.1.6 eslint@8.24.0 eslint-config-react-app@7.0.1 eslint-import-resolver-typescript@3.5.1 eslint-plugin-cypress@2.12.1 eslint-plugin-flowtype@8.0.3 eslint-plugin-import@2.26.0 eslint-plugin-jest@27.1.0 eslint-plugin-jsx-a11y@6.6.1 eslint-plugin-jsx-expressions@1.3.1 eslint-plugin-react@7.31.8 eslint-plugin-react-hooks@4.6.0 eslint-plugin-security@1.5.0 eslint-plugin-sonarjs@0.15.0 eslint-plugin-testing-library@5.7.2 eslint-plugin-unicorn@44.0.0 typescript@4.8.4 --dev
I expected it to be successfully installed and not to show the ERR undefined which worked but when I tried to run Preflight on my project , I got the error that my ESLint config version ( 2.16.2
) is outdated and I should update it to 2.16.3
.
After successfully updating the ESLing config version when I tried to run preflight again I started getting the below mentioned error:
✖ ESLint config is latest version
› Your ESLint config file .eslintrc.cjs does not match the configuration file template. Please reinstall the config using the instructions on
https://www.npmjs.com/package/@upleveled/eslint-config-upleveled
What I tried to solve it
- I updated the ESlint config to the latest version.
- Deleted node_modules and reinstalled it.
- I checked the .eslintrc.cjs file is commented out.
I'll enable SafeQL support in the ESLint config instead (so that the ESLint config can stay the same as it has been), watch this issue: upleveled/eslint-config-upleveled#162