chore: Configureer linter (ESLint)
This commit is contained in:
		
							parent
							
								
									977b49f659
								
							
						
					
					
						commit
						df2f26482c
					
				
					 3 changed files with 132 additions and 30 deletions
				
			
		|  | @ -1,36 +1,45 @@ | |||
| import pluginVue from 'eslint-plugin-vue' | ||||
| import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' | ||||
| import pluginVitest from '@vitest/eslint-plugin' | ||||
| import pluginPlaywright from 'eslint-plugin-playwright' | ||||
| import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' | ||||
| import pluginVue from 'eslint-plugin-vue'; | ||||
| import { | ||||
|     defineConfigWithVueTs, | ||||
|     vueTsConfigs, | ||||
| } from '@vue/eslint-config-typescript'; | ||||
| import pluginVitest from '@vitest/eslint-plugin'; | ||||
| import pluginPlaywright from 'eslint-plugin-playwright'; | ||||
| import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'; | ||||
| import rootConfig from '../eslint.config'; | ||||
| 
 | ||||
| // To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
 | ||||
| // import { configureVueProject } from '@vue/eslint-config-typescript'
 | ||||
| // configureVueProject({ scriptLangs: ['ts', 'tsx'] })
 | ||||
| // Import { configureVueProject } from '@vue/eslint-config-typescript'
 | ||||
| // ConfigureVueProject({ scriptLangs: ['ts', 'tsx'] })
 | ||||
| // More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
 | ||||
| 
 | ||||
| export default defineConfigWithVueTs( | ||||
|   { | ||||
|     name: 'app/files-to-lint', | ||||
|     files: ['**/*.{ts,mts,tsx,vue}'], | ||||
|   }, | ||||
| const vueConfig = defineConfigWithVueTs( | ||||
|     { | ||||
|         name: 'app/files-to-lint', | ||||
|         files: ['**/*.{ts,mts,tsx,vue}'], | ||||
|     }, | ||||
| 
 | ||||
|   { | ||||
|     name: 'app/files-to-ignore', | ||||
|     ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], | ||||
|   }, | ||||
|     { | ||||
|         name: 'app/files-to-ignore', | ||||
|         ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], | ||||
|     }, | ||||
| 
 | ||||
|   pluginVue.configs['flat/essential'], | ||||
|   vueTsConfigs.recommended, | ||||
|    | ||||
|   { | ||||
|     ...pluginVitest.configs.recommended, | ||||
|     files: ['src/**/__tests__/*'], | ||||
|   }, | ||||
|    | ||||
|   { | ||||
|     ...pluginPlaywright.configs['flat/recommended'], | ||||
|     files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'], | ||||
|   }, | ||||
|   skipFormatting, | ||||
| ) | ||||
|     pluginVue.configs['flat/essential'], | ||||
|     vueTsConfigs.recommended, | ||||
| 
 | ||||
|     { | ||||
|         ...pluginVitest.configs.recommended, | ||||
|         files: ['src/**/__tests__/*'], | ||||
|     }, | ||||
| 
 | ||||
|     { | ||||
|         ...pluginPlaywright.configs['flat/recommended'], | ||||
|         files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'], | ||||
|     }, | ||||
|     skipFormatting | ||||
| ); | ||||
| 
 | ||||
| export default [ | ||||
|     ...rootConfig, | ||||
|     ...vueConfig | ||||
| ] | ||||
|  |  | |||
		Reference in a new issue