DEV Community

Discussion on: Getting Prettier, Eslint and Vscode to work together

Collapse
 
edo_begagic profile image
Edo Begagic

thank you very much for the instructions. they have been very helpful, although when i was setting up eslint and prettier in vscode for react native, i received following Parsing error: "The keyword 'import' is reserved eslint". For others who may experience the same issue, I fixed it by adding additional code to the .eslintrc file and it worked for me:

{
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": ["plugin:prettier/recommended"],

"plugins": ["prettier"],

"rules": {
"prettier/prettier": "error"
}
}

Collapse
 
chgldev profile image
Chris

Grat addition, thank you!