mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	lint: Add Prettier as a linter for YAML files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							2794bc1ef4
						
					
				
				
					commit
					56e8cca025
				
			@@ -93,6 +93,11 @@ def run() -> None:
 | 
			
		||||
    linter_config.external_linter('isort', ['isort'], ['py'],
 | 
			
		||||
                                  description="Sorts Python import statements",
 | 
			
		||||
                                  check_arg=['--check-only', '--diff'])
 | 
			
		||||
    linter_config.external_linter('prettier', ['node_modules/.bin/prettier'], ['yaml', 'yml'],
 | 
			
		||||
                                  check_arg=['--check'], fix_arg=['--write'],
 | 
			
		||||
                                  description="Formats YAML files",
 | 
			
		||||
                                  # https://github.com/prettier/prettier/pull/8703
 | 
			
		||||
                                  suppress_line=lambda line: line in ["Checking formatting...\n", "All matched files use Prettier code style!\n"])
 | 
			
		||||
 | 
			
		||||
    semgrep_command = ["semgrep", "--config=./tools/semgrep.yml", "--error",
 | 
			
		||||
                       # This option is dangerous in the context of running
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user