Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile. Cannot read config file: /workspace/react-crm/.eslintrc.js Error: Unexpected token ':' #17

Open
tyintech opened this issue Sep 22, 2022 · 1 comment

Comments

@tyintech
Copy link

tyintech commented Sep 22, 2022

Failed to compile.

Cannot read config file: /workspace/react-crm/.eslintrc.js
Error: Unexpected token ':'

yarn add eslint-config-standard
yarn add eslint-plugin-promise
yarn add eslint-plugin-n
yarn add eslint
yarn add eslint-friendly-formatter
yarn add eslint-loader
yarn add eslint-plugin-html
yarn add eslint-plugin-nodejs

Here is the full code for .eslintrc.json file.

{
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"react/react-in-jsx-scope": "off"
}
}

yarn run eslint --init
yarn start

@tyintech
Copy link
Author

i have to try https://medium.com/how-to-react/config-eslint-and-prettier-in-visual-studio-code-for-react-js-development-97bb2236b31a thanks , i have to try ,but i got a lot of error ,I don't know how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant