You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							71 lines
						
					
					
						
							2.4 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							71 lines
						
					
					
						
							2.4 KiB
						
					
					
				| module.exports = { | |
|   // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy | |
|   // This option interrupts the configuration hierarchy at this file | |
|   // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) | |
|   root: true, | |
| 
 | |
|   env: { | |
|     browser: true, | |
|     es2022: true, | |
|     node: true, | |
|     'vue/setup-compiler-macros': true, | |
|   }, | |
| 
 | |
|   // Rules order is important, please avoid shuffling them | |
|   extends: [ | |
|     // Base ESLint recommended rules | |
|     'eslint:recommended', | |
| 
 | |
|     // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage | |
|     // ESLint typescript rules | |
|     'plugin:@typescript-eslint/recommended', | |
| 
 | |
|     // Vue ESLint recommended rules | |
|     // 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) | |
|     // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) | |
|     // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) | |
|     'plugin:vue/vue3-recommended', | |
| 
 | |
|     // https://github.com/prettier/eslint-config-prettier#installation | |
|     // usage with Prettier, provided by 'eslint-config-prettier'. | |
|     'plugin:prettier/recommended', // Recommended | |
|   ], | |
| 
 | |
|   parser: 'vue-eslint-parser', | |
|   parserOptions: { | |
|     ecmaVersion: 2022, | |
|     parser: '@typescript-eslint/parser', | |
|     ecmaFeatures: { | |
|       jsx: false, | |
|     }, | |
|   }, | |
| 
 | |
|   plugins: [ | |
|     // required to apply rules which need type information | |
|     '@typescript-eslint', | |
| 
 | |
|     // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files | |
|     // required to lint *.vue files | |
|     'vue', | |
| 
 | |
|     // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 | |
|     // Prettier has not been included as plugin to avoid performance impact | |
|     // add it as an extension for your IDE | |
|   ], | |
| 
 | |
|   rules: { | |
|     semi: [1], | |
|     '@typescript-eslint/no-var-requires': 'off', | |
|     '@typescript-eslint/no-empty-object-type': 'off', | |
|     '@typescript-eslint/no-explicit-any': 'off', | |
|     '@typescript-eslint/no-unused-expressions': 'off', | |
|     '@typescript-eslint/no-unused-vars': 'off', | |
|     '@typescript-eslint/no-this-alias': 'off', | |
|     'vue/multi-word-component-names': 'off' /* 禁用 vue 组件名称检查规则 */, | |
|     'no-prototype-builtins': 'off', | |
|     'prefer-rest-params': 'off', | |
|     'no-control-regex': 'off', | |
|     'no-case-declarations': 'off', | |
|     'vue/no-v-html': 'off' | |
|   }, | |
| };
 | |
| 
 |