chore: add import/order rule for eslint
This commit is contained in:
		
							parent
							
								
									16c7ef41fb
								
							
						
					
					
						commit
						2c1689c798
					
				
					 2 changed files with 15 additions and 0 deletions
				
			
		|  | @ -6,4 +6,16 @@ module.exports = { | ||||||
| 	extends: [ | 	extends: [ | ||||||
| 		'../shared/.eslintrc.js', | 		'../shared/.eslintrc.js', | ||||||
| 	], | 	], | ||||||
|  | 	rules: { | ||||||
|  | 		'import/order': ['warn', { | ||||||
|  | 			'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'], | ||||||
|  | 			'pathGroups': [ | ||||||
|  | 				{ | ||||||
|  | 					'pattern': '@/**', | ||||||
|  | 					'group': 'external', | ||||||
|  | 					'position': 'after' | ||||||
|  | 				} | ||||||
|  | 			], | ||||||
|  | 		}] | ||||||
|  | 	}, | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -68,5 +68,8 @@ module.exports = { | ||||||
| 		}], | 		}], | ||||||
| 		'import/no-unresolved': ['off'], | 		'import/no-unresolved': ['off'], | ||||||
| 		'import/no-default-export': ['warn'], | 		'import/no-default-export': ['warn'], | ||||||
|  | 		'import/order': ['warn', { | ||||||
|  | 			'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'], | ||||||
|  | 		}] | ||||||
| 	}, | 	}, | ||||||
| }; | }; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue