Ensure all files are covered by code-import-patterns (fixes #140857)

This commit is contained in:
Alex Dima
2022-01-17 17:54:49 +01:00
parent fd2c4d9164
commit 4aed6e1fd1
15 changed files with 82 additions and 20 deletions

View File

@@ -10,7 +10,8 @@ module.exports = new class {
constructor() {
this.meta = {
messages: {
badImport: 'Imports violates \'{{restrictions}}\' restrictions. See https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
badImport: 'Imports violates \'{{restrictions}}\' restrictions. See https://github.com/microsoft/vscode/wiki/Source-Code-Organization',
badFilename: 'Missing definition in `code-import-patterns` for this file. Define rules at https://github.com/microsoft/vscode/blob/main/.eslintrc.json'
},
docs: {
url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
@@ -24,6 +25,10 @@ module.exports = new class {
return (0, utils_1.createImportRuleListener)((node, value) => this._checkImport(context, config, node, value));
}
}
context.report({
loc: { line: 1, column: 1 },
messageId: 'badFilename'
});
return {};
}
_checkImport(context, config, node, path) {