Last active
February 29, 2024 00:44
-
-
Save nyagihime/b808c06e11f84e5bc4f656c7bcef6bae to your computer and use it in GitHub Desktop.
eslintrc of Nuxt3
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 = { | |
root: true, | |
env: { | |
browser: true, | |
es2021: true, | |
node: true | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:vue/vue3-recommended', | |
'@vue/typescript/recommended', | |
'@nuxtjs/eslint-config-typescript', | |
'plugin:jsdoc/recommended-typescript' | |
], | |
overrides: [], | |
parser: 'vue-eslint-parser', | |
parserOptions: { | |
parser: '@typescript-eslint/parser', | |
ecmaVersion: 'latest', | |
sourceType: 'module' | |
}, | |
plugins: [ | |
'vue', | |
'@typescript-eslint', | |
'import', | |
'unused-imports', | |
'sort-destructure-keys', | |
'jsdoc' | |
], | |
rules: { | |
// common | |
'no-console': [ | |
'warn', | |
{ | |
allow: ['warn', 'error'] | |
} | |
], | |
'space-before-function-paren': ['warn', 'always'], | |
'space-in-parens': ['warn', 'never'], | |
'object-curly-spacing': ['warn', 'always'], | |
eqeqeq: ['error', 'always'], | |
quotes: ['error', 'single'], | |
semi: ['error', 'never'], | |
// plugins | |
'sort-destructure-keys/sort-destructure-keys': [ | |
'warn', | |
{ | |
caseSensitive: true | |
} | |
], | |
'import/order': [ | |
'warn', | |
{ | |
groups: [ | |
'builtin', | |
'external', | |
'internal' | |
], | |
alphabetize: { | |
order: 'asc' | |
} | |
} | |
], | |
'@typescript-eslint/no-unused-vars': 'error', | |
'unused-imports/no-unused-imports-ts': [ | |
'warn', | |
{ | |
vars: 'all', | |
varsIgnorePattern: '^_', | |
args: 'after-used', | |
argsIgnorePattern: '^_' | |
} | |
], | |
'vue/first-attribute-linebreak': [ | |
'error', | |
{ | |
multiline: 'below', | |
} | |
], | |
"vue/max-attributes-per-line": [ | |
"error", { | |
singleline: { | |
"max": 1 | |
}, | |
multiline: { | |
"max": 1 | |
} | |
} | |
], | |
"vue/component-name-in-template-casing": [ | |
"error", | |
"PascalCase" | |
], | |
'jsdoc/check-access': 'off', | |
'vue/no-multiple-template-root': 'off', | |
'vue/multi-word-component-names': 'off' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment