Skip to content

Commit

Permalink
eslint: update ignorePatterns
Browse files Browse the repository at this point in the history
The following commit updates the `ignorePatterns` to include `*.d.ts`
files maintained by the project and exclude `lib` folders.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Oct 14, 2020
1 parent 0117651 commit 3975e1f
Show file tree
Hide file tree
Showing 15 changed files with 187 additions and 111 deletions.
4 changes: 2 additions & 2 deletions configs/base.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
},
"ignorePatterns": [
"node_modules",
"*.d.ts"
"lib"
]
}
}
1 change: 1 addition & 0 deletions packages/console/src/browser/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// eslint-disable-next-line spaced-comment
/// <reference types='@theia/monaco-editor-core/monaco'/>
167 changes: 91 additions & 76 deletions packages/core/src/typings/native-keymap.d.ts
Original file line number Diff line number Diff line change
@@ -1,93 +1,108 @@
/********************************************************************************
* Copyright (C) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

declare module 'native-keymap' {

export interface IWindowsKeyMapping {
vkey: string;
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
}
export interface IWindowsKeyboardMapping {
[code: string]: IWindowsKeyMapping;
}
export interface ILinuxKeyMapping {
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
}
export interface ILinuxKeyboardMapping {
[code: string]: ILinuxKeyMapping;
}
export interface IMacKeyMapping {
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
valueIsDeadKey: boolean;
withShiftIsDeadKey: boolean;
withAltGrIsDeadKey: boolean;
withShiftAltGrIsDeadKey: boolean;
}
export interface IMacKeyboardMapping {
[code: string]: IMacKeyMapping;
}
export interface IWindowsKeyMapping {
vkey: string;
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
}
export interface IWindowsKeyboardMapping {
[code: string]: IWindowsKeyMapping;
}
export interface ILinuxKeyMapping {
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
}
export interface ILinuxKeyboardMapping {
[code: string]: ILinuxKeyMapping;
}
export interface IMacKeyMapping {
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
valueIsDeadKey: boolean;
withShiftIsDeadKey: boolean;
withAltGrIsDeadKey: boolean;
withShiftAltGrIsDeadKey: boolean;
}
export interface IMacKeyboardMapping {
[code: string]: IMacKeyMapping;
}

export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping;
export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping;

export function getKeyMap(): IKeyboardMapping;
export function getKeyMap(): IKeyboardMapping;

/* __GDPR__FRAGMENT__
"IKeyboardLayoutInfo" : {
"name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"id": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"text": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface IWindowsKeyboardLayoutInfo {
name: string;
id: string;
text: string;
}
/* __GDPR__FRAGMENT__
"IKeyboardLayoutInfo" : {
"name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"id": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"text": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface IWindowsKeyboardLayoutInfo {
name: string;
id: string;
text: string;
}

/* __GDPR__FRAGMENT__
"IKeyboardLayoutInfo" : {
"model" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"layout": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"variant": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"options": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"rules": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface ILinuxKeyboardLayoutInfo {
model: string;
layout: string;
variant: string;
options: string;
rules: string;
}
/* __GDPR__FRAGMENT__
"IKeyboardLayoutInfo" : {
"model" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"layout": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"variant": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"options": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"rules": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface ILinuxKeyboardLayoutInfo {
model: string;
layout: string;
variant: string;
options: string;
rules: string;
}

/* __GDPR__FRAGMENT__
"IKeyboardLayoutInfo" : {
"id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"lang": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface IMacKeyboardLayoutInfo {
id: string;
lang: string;
}
/* __GDPR__FRAGMENT__
"IKeyboardLayoutInfo" : {
"id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"lang": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface IMacKeyboardLayoutInfo {
id: string;
lang: string;
}

export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo;
export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo;

export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo;
export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo;

export function onDidChangeKeyboardLayout(callback: () => void): void;
export function onDidChangeKeyboardLayout(callback: () => void): void;

export function isISOKeyboard(): boolean;
export function isISOKeyboard(): boolean;
}
1 change: 1 addition & 0 deletions packages/debug/src/browser/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// eslint-disable-next-line spaced-comment
/// <reference types='@theia/monaco/src/typings/monaco'/>
2 changes: 2 additions & 0 deletions packages/filesystem/src/typings/dom.webkit.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

/* eslint-disable no-var */

type WebKitEntriesCallback = ((entries: WebKitEntry[]) => void) | { handleEvent(entries: WebKitEntry[]): void; };

type WebKitErrorCallback = ((err: DOMError) => void) | { handleEvent(err: DOMError): void; };
Expand Down
2 changes: 1 addition & 1 deletion packages/filesystem/src/typings/mv/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

export = mv;
declare module mv { }
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
type MvOptions = { mkdirp?: boolean, clobber?: boolean, limit?: number };
declare function mv(sourcePath: string, targetPath: string, options?: MvOptions, cb?: (error: NodeJS.ErrnoException) => void): void;

2 changes: 2 additions & 0 deletions packages/filesystem/src/typings/nsfw/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// eslint-disable-next-line spaced-comment
/// <reference types="@theia/core/src/typings/nsfw/index"/>
1 change: 1 addition & 0 deletions packages/git/src/browser/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// eslint-disable-next-line spaced-comment
/// <reference types='@theia/monaco/src/typings/monaco'/>
19 changes: 18 additions & 1 deletion packages/keymaps/src/browser/monaco.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
/// <reference types="@theia/monaco/src/typings/monaco/index"/>
/********************************************************************************
* Copyright (C) 2018 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// eslint-disable-next-line spaced-comment
/// <reference types="@theia/monaco/src/typings/monaco/index"/>
5 changes: 4 additions & 1 deletion packages/monaco/src/typings/monaco/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
********************************************************************************/

/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable max-len */

// eslint-disable-next-line spaced-comment
/// <reference types='@theia/monaco-editor-core/monaco'/>

declare module monaco.languages {
Expand Down Expand Up @@ -1496,7 +1499,7 @@ declare module monaco.error {

declare module monaco.path {
// https://github.com/microsoft/vscode/blob/320fbada86c113835aef4fb9d7c4bc5b74678166/src/vs/base/common/path.ts#L1494
export function normalize(path: string): string;
export function normalize(uriPath: string): string;
}

declare module monaco.wordHelper {
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-ext/src/typings/monaco/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

// eslint-disable-next-line spaced-comment
/// <reference types='@theia/monaco/src/typings/monaco'/>

/* expose internal APIs in @theia/monaco/src/typings/monaco */
Loading

0 comments on commit 3975e1f

Please sign in to comment.