| 
									
										
										
										
											2020-01-24 15:39:14 +01:00
										 |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2022-08-08 23:33:39 +02:00
										 |  |  |   parser: '@babel/eslint-parser', | 
					
						
							| 
									
										
										
										
											2023-07-28 08:02:17 +01:00
										 |  |  |   extends: ['@strapi/eslint-config/front/javascript'], | 
					
						
							| 
									
										
										
										
											2020-01-24 15:39:14 +01:00
										 |  |  |   env: { | 
					
						
							|  |  |  |     browser: true, | 
					
						
							|  |  |  |     commonjs: true, | 
					
						
							|  |  |  |     es6: true, | 
					
						
							|  |  |  |     jest: true, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   parserOptions: { | 
					
						
							| 
									
										
										
										
											2022-08-08 23:33:39 +02:00
										 |  |  |     requireConfigFile: false, | 
					
						
							|  |  |  |     babelOptions: { | 
					
						
							|  |  |  |       presets: ['@babel/preset-react'], | 
					
						
							| 
									
										
										
										
											2020-01-24 15:39:14 +01:00
										 |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   globals: { | 
					
						
							|  |  |  |     window: false, | 
					
						
							|  |  |  |     // TODO: put all this in process.env in webpack to avoid having to set them here
 | 
					
						
							| 
									
										
										
										
											2021-05-05 10:48:27 +02:00
										 |  |  |     ADMIN_PATH: true, | 
					
						
							| 
									
										
										
										
											2020-01-24 15:39:14 +01:00
										 |  |  |     BACKEND_URL: true, | 
					
						
							|  |  |  |     PUBLIC_PATH: true, | 
					
						
							|  |  |  |     NODE_ENV: true, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   settings: { | 
					
						
							|  |  |  |     react: { | 
					
						
							| 
									
										
										
										
											2022-08-08 23:33:39 +02:00
										 |  |  |       version: 'detect', | 
					
						
							| 
									
										
										
										
											2020-01-24 15:39:14 +01:00
										 |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2022-08-09 18:01:17 +02:00
										 |  |  |   rules: { | 
					
						
							| 
									
										
										
										
											2023-03-22 11:21:33 +01:00
										 |  |  |     'prettier/prettier': 'off', | 
					
						
							| 
									
										
										
										
											2022-08-09 18:01:17 +02:00
										 |  |  |     'react/jsx-no-constructed-context-values': 'warn', | 
					
						
							|  |  |  |     'react/jsx-no-useless-fragment': 'warn', | 
					
						
							|  |  |  |     'react/no-unstable-nested-components': 'warn', | 
					
						
							| 
									
										
										
										
											2023-06-12 15:22:11 +02:00
										 |  |  |     'import/order': [ | 
					
						
							|  |  |  |       'error', | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         groups: [ | 
					
						
							|  |  |  |           ['external', 'internal', 'builtin'], | 
					
						
							|  |  |  |           'parent', | 
					
						
							|  |  |  |           ['sibling', 'index'], | 
					
						
							|  |  |  |           'object', | 
					
						
							|  |  |  |           'type', | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |         pathGroups: [{ pattern: 'react', group: 'external', position: 'before' }], | 
					
						
							|  |  |  |         pathGroupsExcludedImportTypes: ['react'], | 
					
						
							|  |  |  |         'newlines-between': 'always', | 
					
						
							|  |  |  |         alphabetize: { order: 'asc', caseInsensitive: true }, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2023-02-15 16:24:54 +00:00
										 |  |  |     'no-restricted-imports': [ | 
					
						
							|  |  |  |       'error', | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2023-02-16 17:24:28 +01:00
										 |  |  |         paths: [ | 
					
						
							| 
									
										
										
										
											2023-03-17 13:45:45 +01:00
										 |  |  |           { | 
					
						
							|  |  |  |             name: 'lodash', | 
					
						
							|  |  |  |             message: 'Please use import [method] from lodash/[method]', | 
					
						
							|  |  |  |           }, | 
					
						
							| 
									
										
										
										
											2023-02-16 17:24:28 +01:00
										 |  |  |         ], | 
					
						
							| 
									
										
										
										
											2023-02-15 16:24:54 +00:00
										 |  |  |       }, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2023-05-16 10:56:46 +02:00
										 |  |  |     'no-restricted-globals': [ | 
					
						
							|  |  |  |       'error', | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: 'strapi', | 
					
						
							|  |  |  |         message: 'Use window.strapi instead.', | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2022-08-09 18:01:17 +02:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2020-01-24 15:39:14 +01:00
										 |  |  | }; |