Skip to content

Instantly share code, notes, and snippets.

@aklinker1
Last active October 14, 2021 23:20
Show Gist options
  • Save aklinker1/553ddd48ce59d985af784de9abbd0e8e to your computer and use it in GitHub Desktop.
Save aklinker1/553ddd48ce59d985af784de9abbd0e8e to your computer and use it in GitHub Desktop.
ESLint Setup
root: true
parser: vue-eslint-parser
parserOptions:
parser: '@typescript-eslint/parser'
sourceType: module
plugins:
- '@typescript-eslint'
- only-warn
extends:
- eslint:recommended
env:
browser: true
node: true
rules:
no-unused-vars:
- warn
- argsIgnorePattern: _.*
varsIgnorePattern: _.*
generator-star-spacing: off
overrides:
- files: ['*.js']
- files: ['*.ts']
excludedFiles: ['*.d.ts']
extends:
- plugin:@typescript-eslint/recommended
- files: ['*.vue', '*.tsx', '*.jsx']
extends:
- plugin:vue/vue3-strongly-recommended
rules:
no-unused-vars: off
vue/singleline-html-element-content-newline: off
vue/max-attributes-per-line: off
vue/html-self-closing: off
vue/html-closing-bracket-newline: off
vue/html-indent: off
pnpm add -D \
eslint \
typescript \
@typescript-eslint/parser \
@typescript-eslint/eslint-plugin \
eslint-plugin-vue \
eslint-plugin-only-warn
{
"scripts": {
"lint": "yarn lint:check --fix",
"lint:check": "eslint . --ext .js,.ts,.vue --max-warnings 0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment