12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /*
- * @Author: wjc
- * @Date: 2024-05-27 11:53:23
- * @LastEditors: wjc
- * @LastEditTime: 2024-05-31 09:24:37
- * @Description:
- */
- module.exports = {
- env: {
- browser: true,
- node: true,
- },
- extends: [
- 'eslint:recommended',
- 'plugin:vue/vue3-essential',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:import/recommended',
- 'standard',
- 'prettier',
- 'plugin:prettier/recommended',
- ],
- parser: 'vue-eslint-parser',
- parserOptions: {
- ecmaVersion: 2020,
- // 指定eslint解析器
- parser: '@typescript-eslint/parser',
- // 允许使用 import
- sourceType: 'module',
- // 允许解析 jsx
- ecmaFeatures: {
- jsx: true,
- },
- },
- plugins: ['vue', '@typescript-eslint', 'prettier', 'import'],
- rules: {
- 'vue/no-mutating-props': [
- 'error',
- {
- shallowOnly: true, // 启用更改props值但保持引用不变的功能
- },
- ],
- 'import/no-unresolved': 'off',
- 'vue/valid-template-root': [0],
- 'vue/no-reserved-component-names': 'off',
- 'vue/multi-word-component-names': [1],
- '@typescript-eslint/no-explicit-any': 'off',
- '@typescript-eslint/ban-ts-comment': [0],
- '@typescript-eslint/no-unused-vars': [0],
- // 'space-before-function-paren': 1,
- // 'no-unused-vars': 'off',
- },
- }
|