代码拉取完成,页面将自动刷新
module.exports = {
root: true,
extends: ['plugin:@typescript-eslint/recommended', 'eslint-config-airbnb-base', 'plugin:vue/vue3-recommended', 'plugin:vue-scoped-css/base', 'plugin:prettier/recommended'],
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
},
plugins: ['vue', '@typescript-eslint', 'prettier'],
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
allowImportExportEverywhere: true,
ecmaFeatures: {
jsx: true,
},
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx', '.vue'],
},
rules: {
'consistent-return': 'off',
'no-tabs': 'off',
'max-len': ['error', { code: 200 }],
'no-console': 2,
'no-continue': 'off',
'no-restricted-syntax': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'no-shadow': 'off',
'guard-for-in': 'off',
'prefer-destructuring': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/first': 'off', // https://github.com/vuejs/vue-eslint-parser/issues/58
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'vue/first-attribute-linebreak': 0,
'@typescript-eslint/no-non-null-assertion': 'off',
'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
'class-methods-use-this': 'off',
'no-unused-expressions': 'off',
'object-curly-newline': 0,
'comma-dangle': 0,
'no-unused-vars': 0,
},
overrides: [
{
files: ['*.vue'],
rules: {
'vue/component-name-in-template-casing': [0, 'kebab-case'],
'vue/require-default-prop': 0,
'vue/multi-word-component-names': 0,
'vue/no-reserved-props': 0,
'vue/no-v-html': 0,
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: 3,
},
multiline: {
max: 3,
},
},
],
'singleline-html-element-content-newline': 0,
'vue/valid-v-model': 'off',
'no-undef': 'off',
'no-console': 'off',
'vue/html-closing-bracket-newline': 0,
'vue/html-self-closing': 0,
},
},
{
files: ['*.ts', '*.tsx'], // https://github.com/typescript-eslint eslint-recommended
rules: {
'constructor-super': 'off', // ts(2335) & ts(2377)
'getter-return': 'off', // ts(2378)
'no-const-assign': 'off', // ts(2588)
'no-dupe-args': 'off', // ts(2300)
'no-dupe-class-members': 'off', // ts(2393) & ts(2300)
'no-dupe-keys': 'off', // ts(1117)
'no-func-assign': 'off', // ts(2539)
'no-import-assign': 'off', // ts(2539) & ts(2540)
'no-new-symbol': 'off', // ts(2588)
'no-obj-calls': 'off', // ts(2349)
'no-redeclare': 'off', // ts(2451)
'no-setter-return': 'off', // ts(2408)
'no-this-before-super': 'off', // ts(2376)
'no-undef': 'off', // ts(2304)
'no-unreachable': 'off', // ts(7027)
'no-unsafe-negation': 'off', // ts(2365) & ts(2360) & ts(2358)
'no-var': 'error', // ts transpiles let/const to var, so no need for vars any more
'prefer-const': 'error', // ts provides better types with const
'prefer-rest-params': 'error', // ts provides better types with rest args over arguments
'prefer-spread': 'error', // ts transpiles spread to apply, so no need for manual apply
'valid-typeof': 'off', // ts(2367)
'no-console': 'off',
'bject-curly-newline': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'no-unused-vars': 'off',
'no-undef': 'off',
},
},
],
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。