Skip to content

Instantly share code, notes, and snippets.

@iiiBird
Last active September 30, 2023 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iiiBird/f3ed353aeb53462e072bfcc4ae0a5137 to your computer and use it in GitHub Desktop.
Save iiiBird/f3ed353aeb53462e072bfcc4ae0a5137 to your computer and use it in GitHub Desktop.
vue 3 typescript eslint prettier
module.exports = {
root: true,
env: {
node: true
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module'
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:vue/vue3-recommended', 'prettier'],
plugins: ['prettier', '@typescript-eslint'],
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'no-unused-vars': 'off',
'vue/no-unused-vars': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/multi-word-component-names': 'off',
'vue/require-v-for-key': 'off',
'vue/no-v-html': 'off',
'prettier/prettier': ['error']
},
ignorePatterns: ['dist']
}
{
"endOfLine": "auto",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "none",
"semi": false,
"useTabs": false,
"arrowParens": "avoid",
"quoteProps": "consistent",
"bracketSpacing": true,
"proseWrap": "always",
"singleAttributePerLine": true
}
npm install -D eslint prettier eslint-plugin-vue @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier @typescript-eslint/eslint-plugin vue-eslint-parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment