mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-03 20:34:20 +01:00 
			
		
		
		
	Run eslint with `--cache` to speed up pre-commit scripts.
This was added to the `pnpm run lint` script in
b7f9495a (build: add eslint --cache file, 2022-08-27)
and doesn't seem to be causing any issues.
I haven't enabled `--cache` for `prettier` since as of prettier 2.8.0,
their cache invalidation doesn't yet work with prettier plugins.
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			434 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			434 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
export default {
 | 
						|
  '!(docs/**/*)*.{ts,js,json,html,md,mts}': [
 | 
						|
    'eslint --cache --cache-strategy content --fix',
 | 
						|
    // don't cache prettier yet, since we use `prettier-plugin-jsdoc`,
 | 
						|
    // and prettier doesn't invalidate cache on plugin updates"
 | 
						|
    // https://prettier.io/docs/en/cli.html#--cache
 | 
						|
    'prettier --write',
 | 
						|
  ],
 | 
						|
  'cSpell.json': ['ts-node-esm scripts/fixCSpell.ts'],
 | 
						|
  '**/*.jison': ['pnpm -w run lint:jison'],
 | 
						|
};
 |