Answer the question
In order to leave comments, you need to log in
How to setup esliint+ prettier plugin to work with vue?
I have a problem when I installed with the eslint + prettier project via (create-nuxt-app) and when I start editing the standard template it shows me errors, I think this is a compatibility problem, for example, such an error
Parsing error: Unexpected token `:`, expected an identifiereslintprettier/prettier
Parsing error: Unexpected token <. Remember, adjacent JSX elements must be wrapped in an enclosing parent tageslintprettier/prettier
error Parsing error: Unexpected token `=`, expected an identifier
{
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Atom One Dark",
"window.zoomLevel": 1,
"git.autofetch": true,
"git.enableSmartCommit": true,
"editor.formatOnSave": true,
"vetur.validation.template": true
}
module.exports = {
root: true,
env: {
browser: true,
node: true,
'es6': true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'@nuxtjs',
'prettier',
'prettier/vue',
'plugin:prettier/recommended',
'plugin:nuxt/recommended',
'plugin:vue/essential',
'standard'
],
plugins: [
'prettier','vue'
],
// add your custom rules here
rules: {
'nuxt/no-cjs-in-config': 'off',
'max-len': ["error", 500],
"prettier/prettier": ["error", {
"endOfLine":"auto"
}],
}
}
{
"semi": true,
"arrowParens": "always",
"singleQuote": true,
"parser": "flow"
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question