Skip to content

Instantly share code, notes, and snippets.

@ArmandoHerra
Created September 11, 2019 05:08
Show Gist options
  • Select an option

  • Save ArmandoHerra/696245eac1f5523af9d5ab89a2311c77 to your computer and use it in GitHub Desktop.

Select an option

Save ArmandoHerra/696245eac1f5523af9d5ab89a2311c77 to your computer and use it in GitHub Desktop.
Eslint configuration for Vue/Nuxt projects.
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: "babel-eslint",
sourceType: "module"
},
extends: [
"@nuxtjs",
"plugin:nuxt/recommended",
"plugin:vue/recommended",
"eslint:recommended",
],
plugins: ["vue"],
// add your custom rules here
rules: {
semi: [2, "never"],
"no-console": 0,
"nuxt/no-cjs-in-config": "off",
"vue/html-indent": ["error", 4, {
attribute: 1,
baseIndent: 1,
closeBracket: 0,
alignAttributesVertically: true,
ignores: []
}],
"vue/script-indent": ["error", 4, {
"baseIndent": 0,
"switchCase": 1,
"ignores": []
}],
"vue/html-closing-bracket-newline": [
"error",
{
singleline: "never",
multiline: "never"
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment