Open nbayramberdiyev opened 2 years ago
Description:
I'm getting the following error:
Parsing error: require() of ES Module
Dependencies:
"gatsby": "^4.21.1", "gatsby-plugin-eslint": "^4.0.2", "babel-eslint": "^10.1.0", "eslint": "^8.23.0", "eslint-plugin-react": "^7.31.1", "eslint-webpack-plugin": "^3.2.0", "gatsby-plugin-eslint": "^4.0.2"
The gatsby-config.js file:
gatsby-config.js
// ... { resolve: 'gatsby-plugin-eslint', options: { rulePaths: [ path.join( process.cwd(), 'node_modules', 'gatsby', 'dist', 'utils', 'eslint-rules', ), ], stages: ['develop'], extensions: ['js'], exclude: ['node_modules', '.cache', 'public', 'es'], }, }, // ...
The .eslintrc file:
.eslintrc
{ "parser": "babel-eslint", "settings": { "react": { "version": "detect" } }, "env": { "browser": true, "node": true, "es6": true }, "extends": ["eslint:recommended", "plugin:react/recommended"], "rules": { "no-anonymous-exports-page-templates": "warn", "limited-exports-page-templates": "warn", "strict": 0, "react/prop-types": 0, "react/no-unescaped-entities": 0, "no-irregular-whitespace": ["error", { "skipTemplates": true }] } }
Why is this happening?
Description:
I'm getting the following error:
Dependencies:
The
gatsby-config.js
file:The
.eslintrc
file:Why is this happening?