Restrict imports from any out/ directories (#41515)

* Restrict imports from any `out/` directories
This commit is contained in:
David Veszelovszki 2022-10-17 11:09:33 +02:00 committed by GitHub
parent 7067cc54ba
commit acd5c65c75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -84,6 +84,11 @@ See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-so
message:
'Imports from package internals are banned. Add relevant export to the entry point of the package to import it from the outside world.',
},
{
group: ['**/out/*'],
message:
"Please don't import stuff from the 'out' directory. Its generated code. Remove the 'out/' part and you should be good go to.",
},
],
},
],

View File

@ -1,7 +1,9 @@
import path from 'path'
import * as esbuild from 'esbuild'
// eslint-disable-next-line no-restricted-imports
import { EditorFeature, featuresArr } from 'monaco-editor-webpack-plugin/out/features'
// eslint-disable-next-line no-restricted-imports
import { EditorLanguage, languagesArr } from 'monaco-editor-webpack-plugin/out/languages'
import { MONACO_LANGUAGES_AND_FEATURES } from '@sourcegraph/build-config'