mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-31 00:10:04 +08:00
Remove code-no-native-private ESLint rule (#295535)
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import type * as ESTree from 'estree';
|
||||
|
||||
export default new class ApiProviderNaming implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
slow: 'Native private fields are much slower and should only be used when needed. Ignore this warning if you know what you are doing, use compile-time private otherwise. See https://github.com/microsoft/vscode/issues/185991#issuecomment-1614468158 for details',
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
||||
return {
|
||||
['PropertyDefinition PrivateIdentifier']: (node: ESTree.Node) => {
|
||||
context.report({
|
||||
node,
|
||||
messageId: 'slow'
|
||||
});
|
||||
},
|
||||
['MethodDefinition PrivateIdentifier']: (node: ESTree.Node) => {
|
||||
context.report({
|
||||
node,
|
||||
messageId: 'slow'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -77,7 +77,6 @@ export default tseslint.config(
|
||||
'no-var': 'warn',
|
||||
'semi': 'warn',
|
||||
'local/code-translation-remind': 'warn',
|
||||
'local/code-no-native-private': 'warn',
|
||||
'local/code-no-declare-const-enum': 'warn',
|
||||
'local/code-parameter-properties-must-have-explicit-accessibility': 'warn',
|
||||
'local/code-no-nls-in-standalone-editor': 'warn',
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { Model } from '../model';
|
||||
import { Repository as BaseRepository, Resource } from '../repository';
|
||||
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, ForcePushMode, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState, CommitOptions, RefType, CredentialsProvider, BranchQuery, PushErrorHandler, PublishEvent, FetchOptions, RemoteSourceProvider, RemoteSourcePublisher, PostCommitCommandsProvider, RefQuery, BranchProtectionProvider, InitOptions, SourceControlHistoryItemDetailsProvider, GitErrorCodes, CloneOptions, CommitShortStat, DiffChange, Worktree, RepositoryKind, RepositoryAccessDetails } from './git';
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import type * as vscode from 'vscode';
|
||||
import { coalesce } from '../../../base/common/arrays.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { validateConstraint } from '../../../base/common/types.js';
|
||||
import { ICommandMetadata } from '../../../platform/commands/common/commands.js';
|
||||
import * as extHostTypes from './extHostTypes.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { localize } from '../../../nls.js';
|
||||
import { IMarkerData, MarkerSeverity } from '../../../platform/markers/common/markers.js';
|
||||
import { URI, UriComponents } from '../../../base/common/uri.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import * as nls from '../../../nls.js';
|
||||
import * as path from '../../../base/common/path.js';
|
||||
import * as performance from '../../../base/common/performance.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { URI, UriComponents } from '../../../base/common/uri.js';
|
||||
import { Event, Emitter } from '../../../base/common/event.js';
|
||||
import { debounce } from '../../../base/common/decorators.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import type * as vscode from 'vscode';
|
||||
|
||||
import { ExtHostSecretState } from './extHostSecretState.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable, ThemeColor, asStatusBarItemIdentifier } from './extHostTypes.js';
|
||||
import type * as vscode from 'vscode';
|
||||
import { MainContext, MainThreadStatusBarShape, IMainContext, ICommandDto, ExtHostStatusBarShape, StatusBarItemDto } from './extHost.protocol.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { URI, UriComponents } from '../../../base/common/uri.js';
|
||||
import { asPromise } from '../../../base/common/async.js';
|
||||
import { Event, Emitter } from '../../../base/common/event.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import type * as vscode from 'vscode';
|
||||
import { RunOnceScheduler } from '../../../base/common/async.js';
|
||||
import { VSBuffer } from '../../../base/common/buffer.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import type * as vscode from 'vscode';
|
||||
import { asArray } from '../../../base/common/arrays.js';
|
||||
import { VSBuffer } from '../../../base/common/buffer.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import type * as vscode from 'vscode';
|
||||
import { MarkdownString as BaseMarkdownString, MarkdownStringTrustedOptions } from '../../../../base/common/htmlContent.js';
|
||||
import { es5ClassCompat } from './es5ClassCompat.js';
|
||||
|
||||
@@ -9,8 +9,6 @@ import { illegalArgument } from '../../../../base/common/errors.js';
|
||||
import { Mimes, normalizeMimeType, isTextStreamMime } from '../../../../base/common/mime.js';
|
||||
import { generateUuid } from '../../../../base/common/uuid.js';
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
export enum NotebookCellKind {
|
||||
Markup = 1,
|
||||
Code = 2
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { VSBuffer } from '../../../base/common/buffer.js';
|
||||
import { Emitter, Event } from '../../../base/common/event.js';
|
||||
import { Disposable } from '../../../base/common/lifecycle.js';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
import { Emitter } from '../../../base/common/event.js';
|
||||
import { Disposable } from '../../../base/common/lifecycle.js';
|
||||
import { URI } from '../../../base/common/uri.js';
|
||||
|
||||
@@ -13,8 +13,6 @@ import type * as vscode from 'vscode';
|
||||
import * as extHostProtocol from './extHost.protocol.js';
|
||||
import * as extHostTypes from './extHostTypes.js';
|
||||
|
||||
/* eslint-disable local/code-no-native-private */
|
||||
|
||||
class ExtHostWebviewView extends Disposable implements vscode.WebviewView {
|
||||
|
||||
readonly #handle: extHostProtocol.WebviewHandle;
|
||||
|
||||
Reference in New Issue
Block a user