Created
April 20, 2022 14:53
-
-
Save vinicius73/aee42455c0f5c0db080b6b6b5539a15f to your computer and use it in GitHub Desktop.
Eslint + Prettier + Vue v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/.yarn/** | |
/dist/** | |
/node_modules/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/.yarn/** | |
/dist/** | |
/node_modules/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
singleQuote: true, | |
semi: true, | |
printWidth: 250, | |
trailingComma: 'es5', | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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