Skip to content

Instantly share code, notes, and snippets.

@vinicius73
Created April 20, 2022 14:53
Show Gist options
  • Save vinicius73/aee42455c0f5c0db080b6b6b5539a15f to your computer and use it in GitHub Desktop.
Save vinicius73/aee42455c0f5c0db080b6b6b5539a15f to your computer and use it in GitHub Desktop.
Eslint + Prettier + Vue v2
/.yarn/**
/dist/**
/node_modules/**
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/essential', 'plugin:prettier/recommended', '@vue/eslint-config-prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'warn', // TODO: turn error on production
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
};
/.yarn/**
/dist/**
/node_modules/**
module.exports = {
singleQuote: true,
semi: true,
printWidth: 250,
trailingComma: 'es5',
};
{
"private": true,
"scripts": {
"lint": "NODE_ENV=production eslint .",
"lint:fix": "NODE_ENV=production eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.3",
"@vue/eslint-config-prettier": "^7.0.0",
"eslint": "^8.13.0",
"eslint-plugin-vue": "^8.6.0",
"prettier": "^2.6.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment