mirror of
				https://github.com/theoludwig/eslint-config-conventions.git
				synced 2025-10-21 07:35:11 +02:00 
			
		
		
		
	docs: eslint.config.js
This commit is contained in:
		
							
								
								
									
										15
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								README.md
									
									
									
									
									
								
							| @@ -59,15 +59,22 @@ Dependencies are: | ||||
|  | ||||
| ### Configuration | ||||
|  | ||||
| #### `eslint.config.js` (JavaScript and TypeScript) | ||||
| #### `eslint.config.js` | ||||
|  | ||||
| ```js | ||||
| // @ts-check | ||||
|  | ||||
| import typescriptESLint from "typescript-eslint" | ||||
| import configConventions from "eslint-config-conventions" | ||||
|  | ||||
| export default typescriptESLint.config(...configConventions) | ||||
| export default typescriptESLint.config(...configConventions, { | ||||
|   files: ["**/*.ts", "**/*.tsx"], | ||||
|   languageOptions: { | ||||
|     parser: typescriptESLint.parser, | ||||
|     parserOptions: { | ||||
|       projectService: true, | ||||
|       tsconfigRootDir: import.meta.dirname, | ||||
|     }, | ||||
|   }, | ||||
| }) | ||||
| ``` | ||||
|  | ||||
| #### Configuration with [Prettier](https://prettier.io/) (recommended) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user