mirror of
				https://github.com/unanmed/HumanBreak.git
				synced 2025-11-04 15:12:58 +08:00 
			
		
		
		
	chore: 添加 == != xxx={true} 的 eslint 限制
This commit is contained in:
		
							parent
							
								
									a2cbe66409
								
							
						
					
					
						commit
						1bfad1d5e7
					
				@ -3,18 +3,22 @@ import globals from 'globals';
 | 
				
			|||||||
import tseslint from 'typescript-eslint';
 | 
					import tseslint from 'typescript-eslint';
 | 
				
			||||||
import eslintPluginVue from 'eslint-plugin-vue';
 | 
					import eslintPluginVue from 'eslint-plugin-vue';
 | 
				
			||||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
 | 
					import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
 | 
				
			||||||
 | 
					import eslintPluginReact from 'eslint-plugin-react';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default tseslint.config(
 | 
					export default tseslint.config(
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        ignores: ['node_modules', 'dist', 'public']
 | 
					        ignores: ['node_modules', 'dist', 'public']
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eslint.configs.recommended,
 | 
					    eslint.configs.recommended,
 | 
				
			||||||
    ...tseslint.configs.recommended,
 | 
					    ...tseslint.configs.recommended,
 | 
				
			||||||
    ...eslintPluginVue.configs['flat/recommended'],
 | 
					    ...eslintPluginVue.configs['flat/recommended'],
 | 
				
			||||||
 | 
					    eslintPluginPrettierRecommended,
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        files: ['**/*.{js,mjs,cjs,vue}'],
 | 
					        files: ['**/*.{js,mjs,cjs,vue}'],
 | 
				
			||||||
        rules: {
 | 
					        rules: {
 | 
				
			||||||
            'no-console': 'warn'
 | 
					            'no-console': 'warn',
 | 
				
			||||||
 | 
					            eqeqeq: ['error', 'always']
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -47,6 +51,9 @@ export default tseslint.config(
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        files: ['**/*.{ts,tsx,vue}'],
 | 
					        files: ['**/*.{ts,tsx,vue}'],
 | 
				
			||||||
 | 
					        plugins: {
 | 
				
			||||||
 | 
					            react: eslintPluginReact
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        rules: {
 | 
					        rules: {
 | 
				
			||||||
            '@typescript-eslint/no-empty-object-type': 'off',
 | 
					            '@typescript-eslint/no-empty-object-type': 'off',
 | 
				
			||||||
            '@typescript-eslint/no-explicit-any': 'off',
 | 
					            '@typescript-eslint/no-explicit-any': 'off',
 | 
				
			||||||
@ -65,8 +72,9 @@ export default tseslint.config(
 | 
				
			|||||||
            '@typescript-eslint/no-namespace': 'off',
 | 
					            '@typescript-eslint/no-namespace': 'off',
 | 
				
			||||||
            '@typescript-eslint/no-this-alias': 'off',
 | 
					            '@typescript-eslint/no-this-alias': 'off',
 | 
				
			||||||
            'no-console': 'warn',
 | 
					            'no-console': 'warn',
 | 
				
			||||||
            'vue/multi-word-component-names': 'off'
 | 
					            'vue/multi-word-component-names': 'off',
 | 
				
			||||||
 | 
					            eqeqeq: ['error', 'always'],
 | 
				
			||||||
 | 
					            'react/jsx-boolean-value': ['error', 'never']
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    eslintPluginPrettierRecommended
 | 
					 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
				
			|||||||
@ -63,6 +63,7 @@
 | 
				
			|||||||
        "concurrently": "^9.1.2",
 | 
					        "concurrently": "^9.1.2",
 | 
				
			||||||
        "eslint": "^9.22.0",
 | 
					        "eslint": "^9.22.0",
 | 
				
			||||||
        "eslint-plugin-prettier": "^5.5.0",
 | 
					        "eslint-plugin-prettier": "^5.5.0",
 | 
				
			||||||
 | 
					        "eslint-plugin-react": "^7.37.5",
 | 
				
			||||||
        "eslint-plugin-vue": "^9.33.0",
 | 
					        "eslint-plugin-vue": "^9.33.0",
 | 
				
			||||||
        "fontmin": "^0.9.9",
 | 
					        "fontmin": "^0.9.9",
 | 
				
			||||||
        "form-data": "^4.0.2",
 | 
					        "form-data": "^4.0.2",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										947
									
								
								pnpm-lock.yaml
									
									
									
									
									
								
							
							
						
						
									
										947
									
								
								pnpm-lock.yaml
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user