add global __webpack_public_path__ to eslint config
This commit is contained in:
		
							parent
							
								
									3695c6bc6d
								
							
						
					
					
						commit
						a7eb806e93
					
				|  | @ -6,6 +6,7 @@ | ||||||
|   }, |   }, | ||||||
|   "extends": "airbnb-base", |   "extends": "airbnb-base", | ||||||
|   "globals": { |   "globals": { | ||||||
|  |     "__webpack_public_path__": true, | ||||||
|     "_": false, |     "_": false, | ||||||
|     "gl": false, |     "gl": false, | ||||||
|     "gon": false, |     "gon": false, | ||||||
|  |  | ||||||
|  | @ -1,13 +1,11 @@ | ||||||
| /* eslint-disable no-underscore-dangle, camelcase */ |  | ||||||
| /* global __webpack_public_path__ */ |  | ||||||
| 
 |  | ||||||
| import monacoContext from 'monaco-editor/dev/vs/loader'; | import monacoContext from 'monaco-editor/dev/vs/loader'; | ||||||
| 
 | 
 | ||||||
| monacoContext.require.config({ | monacoContext.require.config({ | ||||||
|   paths: { |   paths: { | ||||||
|     vs: `${__webpack_public_path__}monaco-editor/vs`, |     vs: `${__webpack_public_path__}monaco-editor/vs`, // eslint-disable-line camelcase
 | ||||||
|   }, |   }, | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
|  | // eslint-disable-next-line no-underscore-dangle
 | ||||||
| window.__monaco_context__ = monacoContext; | window.__monaco_context__ = monacoContext; | ||||||
| export default monacoContext.require; | export default monacoContext.require; | ||||||
|  |  | ||||||
|  | @ -5,5 +5,5 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| if (gon && gon.webpack_public_path) { | if (gon && gon.webpack_public_path) { | ||||||
|   __webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line
 |   __webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line camelcase
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,5 +1,3 @@ | ||||||
| /* global __webpack_public_path__ */ |  | ||||||
| 
 |  | ||||||
| import monacoContext from 'monaco-editor/dev/vs/loader'; | import monacoContext from 'monaco-editor/dev/vs/loader'; | ||||||
| import monacoLoader from '~/repo/monaco_loader'; | import monacoLoader from '~/repo/monaco_loader'; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue