Remove references to tslint
This commit is contained in:
Родитель
63ac199c79
Коммит
cd5d1b028a
13
.eslintrc.js
13
.eslintrc.js
|
@ -1,16 +1,3 @@
|
|||
/*
|
||||
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
|
||||
https://github.com/typescript-eslint/tslint-to-eslint-config
|
||||
|
||||
It represents the closest reasonable ESLint configuration to this
|
||||
project's original TSLint configuration.
|
||||
|
||||
We recommend eventually switching this configuration to extend from
|
||||
the recommended rulesets in typescript-eslint.
|
||||
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
|
||||
|
||||
Happy linting! 💖
|
||||
*/
|
||||
module.exports = {
|
||||
"env": {
|
||||
"browser": true,
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
node_modules/**
|
||||
dist/test/**
|
||||
src/**
|
||||
tslint.json
|
||||
*.vsix
|
||||
packages/
|
||||
msbuild/**
|
||||
|
|
6
test.ps1
6
test.ps1
|
@ -2,16 +2,16 @@ $result = 0
|
|||
$errorColor = "Red"
|
||||
$successColor = "Green"
|
||||
|
||||
if ($args[1] -eq '--tslint') {
|
||||
if ($args[1] -eq '--eslint') {
|
||||
npm run lint
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
{
|
||||
Write-Host "`nTSLint Failed.`n" -ForegroundColor $errorColor
|
||||
Write-Host "`nESLint Failed.`n" -ForegroundColor $errorColor
|
||||
$result = 1
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "`nTSLint Succeeded.`n" -ForegroundColor $successColor
|
||||
Write-Host "`nESLint Succeeded.`n" -ForegroundColor $successColor
|
||||
}
|
||||
}
|
||||
|
||||
|
|
6
test.sh
6
test.sh
|
@ -3,18 +3,18 @@ RED=`tput setaf 1`
|
|||
GREEN=`tput setaf 2`
|
||||
NC=`tput sgr0`
|
||||
|
||||
if [ "$1" = "--tslint" ];
|
||||
if [ "$1" = "--eslint" ];
|
||||
then
|
||||
npm run lint
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo ""
|
||||
echo "${RED}TSLint Failed.${NC}"
|
||||
echo "${RED}ESLint Failed.${NC}"
|
||||
echo ""
|
||||
RESULT=1
|
||||
else
|
||||
echo ""
|
||||
echo "${GREEN}TSLint Succeeded.${NC}"
|
||||
echo "${GREEN}ESLint Succeeded.${NC}"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
|
|
24
tslint.json
24
tslint.json
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"array-type": false,
|
||||
"arrow-parens": false,
|
||||
"file-header": [true, "------"],
|
||||
"interface-name": false,
|
||||
"no-console": false,
|
||||
"no-return-await": true,
|
||||
"no-inferrable-types": true,
|
||||
"no-namespace": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"prefer-template": true,
|
||||
"quotemark": [true, "single"],
|
||||
"variable-name": [true, "check-format"],
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": {
|
||||
"options": {
|
||||
"limit": 200
|
||||
}
|
||||
},
|
||||
"no-any": true
|
||||
}
|
||||
}
|
|
@ -108,7 +108,7 @@
|
|||
"test": "npm run compile --silent && node ./dist/test/functional/runTest.js",
|
||||
"clean": "rimraf dist",
|
||||
"compile-all": "cd ../vscode-dotnet-runtime-library && npm install && npm run compile && cd ../vscode-dotnet-runtime-extension && npm install && npm run compile",
|
||||
"lint": "tslint -c ../tslint.json '../vscode-dotnet-runtime-library/src/**/*.ts' '../vscode-dotnet-runtime-extension/src/**/*.ts'",
|
||||
"lint": "eslint -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix",
|
||||
"webpack": "webpack --mode development"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -69,9 +69,6 @@ import {
|
|||
import { dotnetCoreAcquisitionExtensionId } from './DotnetCoreAcquisitionId';
|
||||
import { InstallTrackerSingleton } from 'vscode-dotnet-runtime-library/dist/Acquisition/InstallTrackerSingleton';
|
||||
|
||||
// tslint:disable no-var-requires
|
||||
/* tslint:disable:only-arrow-functions */
|
||||
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
// Extension constants
|
||||
|
@ -579,12 +576,10 @@ export function activate(vsCodeContext: vscode.ExtensionContext, extensionContex
|
|||
supportPhase: resolvedSupportPhase }
|
||||
];
|
||||
}
|
||||
// tslint:disable no-any
|
||||
catch(error : any)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
// tslint:enable no-any
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,10 +29,7 @@ import {
|
|||
} from 'vscode-dotnet-runtime-library';
|
||||
import * as extension from '../../extension';
|
||||
import { warn } from 'console';
|
||||
import { json } from 'stream/consumers';
|
||||
import { InstallTrackerSingleton } from 'vscode-dotnet-runtime-library/dist/Acquisition/InstallTrackerSingleton';
|
||||
/* tslint:disable:no-any */
|
||||
/* tslint:disable:no-unsafe-finally */
|
||||
|
||||
const assert : any = chai.assert;
|
||||
const standardTimeoutTime = 40000;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "../tslint.json"
|
||||
}
|
|
@ -69,7 +69,6 @@ import { IExtensionState } from '../IExtensionState';
|
|||
import { CommandExecutor } from '../Utils/CommandExecutor';
|
||||
import { getInstallFromContext, getInstallIdCustomArchitecture } from '../Utils/InstallIdUtilities';
|
||||
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class DotnetCoreAcquisitionWorker implements IDotnetCoreAcquisitionWorker
|
||||
{
|
||||
|
|
|
@ -11,7 +11,6 @@ import { DotnetDistroSupportStatus } from './LinuxVersionResolver';
|
|||
import { DotnetInstallMode } from './DotnetInstallMode';
|
||||
import { IDistroDotnetSDKProvider } from './IDistroDotnetSDKProvider';
|
||||
import { DotnetVersionResolutionError, EventBasedError } from '../EventStream/EventStreamEvents';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class GenericDistroSDKProvider extends IDistroDotnetSDKProvider
|
||||
{
|
||||
|
|
|
@ -39,8 +39,6 @@ import { DotnetCoreAcquisitionWorker } from './DotnetCoreAcquisitionWorker';
|
|||
import { IEventStream } from '../EventStream/EventStream';
|
||||
import { IExtensionState } from '../IExtensionState';
|
||||
import { IDotnetAcquireContext } from '..';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
|
||||
interface InProgressInstall
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@ import { DotnetVersionSupportPhase,
|
|||
import { IAcquisitionWorkerContext } from './IAcquisitionWorkerContext';
|
||||
import { getAssumedInstallInfo } from '../Utils/InstallIdUtilities';
|
||||
import { DotnetInstallMode } from './DotnetInstallMode';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class VersionResolver implements IVersionResolver {
|
||||
protected webWorker: WebRequestWorker;
|
||||
|
|
|
@ -36,9 +36,6 @@ import { IUtilityContext } from '../Utils/IUtilityContext';
|
|||
import { IAcquisitionWorkerContext } from './IAcquisitionWorkerContext';
|
||||
import { DotnetInstall } from './DotnetInstall';
|
||||
import { CommandExecutorResult } from '../Utils/CommandExecutorResult';
|
||||
/* tslint:disable:only-arrow-functions */
|
||||
/* tslint:disable:no-empty */
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
namespace validationPromptConstants
|
||||
{
|
||||
|
|
|
@ -13,8 +13,6 @@ import { DotnetInstall } from '../Acquisition/DotnetInstall';
|
|||
import { DotnetInstallMode } from '../Acquisition/DotnetInstallMode';
|
||||
import { DotnetInstallType } from '../IDotnetAcquireContext';
|
||||
|
||||
// tslint:disable max-classes-per-file
|
||||
|
||||
export class EventCancellationError extends Error
|
||||
{
|
||||
constructor(public readonly eventType : string, msg : string, stack ? : string)
|
||||
|
@ -388,8 +386,8 @@ export class UserManualInstallFailure extends SuppressedAcquisitionError {
|
|||
eventName = 'UserManualInstallFailure';
|
||||
}
|
||||
|
||||
export class OffilneDetectionLogicTriggered extends SuppressedAcquisitionError {
|
||||
eventName = 'OffilneDetectionLogicTriggered';
|
||||
export class OfflineDetectionLogicTriggered extends SuppressedAcquisitionError {
|
||||
eventName = 'OfflineDetectionLogicTriggered';
|
||||
}
|
||||
|
||||
export class DotnetInstallationValidationMissed extends SuppressedAcquisitionError {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* Licensed to the .NET Foundation under one or more agreements.
|
||||
* The .NET Foundation licenses this file to you under the MIT license.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export interface IWindowDisplayWorker {
|
||||
showErrorMessage(message: string, callback: (response: string| undefined) => void, ...items: string[]): void;
|
||||
|
|
|
@ -25,7 +25,6 @@ import
|
|||
import { IEventStream } from './EventStream';
|
||||
import { IEvent } from './IEvent';
|
||||
import { IModalEventRepublisher } from './IModalEventPublisher';
|
||||
/* tslint:disable:no-empty */
|
||||
|
||||
export class ModalEventRepublisher implements IModalEventRepublisher
|
||||
{
|
||||
|
|
|
@ -5,5 +5,4 @@
|
|||
|
||||
import { Memento } from 'vscode';
|
||||
|
||||
/* tslint:disable:no-empty-interface */
|
||||
export type IExtensionState = Memento
|
||||
|
|
|
@ -58,9 +58,6 @@ import { CommandExecutorResult } from './CommandExecutorResult';
|
|||
import { isRunningUnderWSL, loopWithTimeoutOnCond } from './TypescriptUtilities';
|
||||
import { IEventStream } from '../EventStream/EventStream';
|
||||
|
||||
/* tslint:disable:no-any */
|
||||
/* tslint:disable:no-string-literal */
|
||||
|
||||
export class CommandExecutor extends ICommandExecutor
|
||||
{
|
||||
private pathTroubleshootingOption = 'Troubleshoot';
|
||||
|
|
|
@ -18,7 +18,6 @@ import { formatIssueUrl } from './IssueReporter';
|
|||
import { IAcquisitionWorkerContext } from '../Acquisition/IAcquisitionWorkerContext';
|
||||
import { GetDotnetInstallInfo } from '../Acquisition/DotnetInstall';
|
||||
import { DotnetCoreAcquisitionWorker } from '../Acquisition/DotnetCoreAcquisitionWorker';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export enum AcquireErrorConfiguration {
|
||||
DisplayAllErrorPopups = 0,
|
||||
|
|
|
@ -21,7 +21,6 @@ import { DotnetCommandFallbackArchitectureEvent,
|
|||
DotnetLockReleasedEvent,
|
||||
SuppressedAcquisitionError
|
||||
} from '../EventStream/EventStreamEvents';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class FileUtilities extends IFileUtilities
|
||||
{
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* The .NET Foundation licenses this file to you under the MIT license.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
/*
|
||||
tslint:disable:no-any */
|
||||
|
||||
import { CommandExecutorCommand } from './CommandExecutorCommand';
|
||||
import { IAcquisitionWorkerContext } from '../Acquisition/IAcquisitionWorkerContext';
|
||||
|
|
|
@ -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.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
import { IEventStream } from '../EventStream/EventStream';
|
||||
|
||||
|
|
|
@ -34,13 +34,12 @@ import {
|
|||
DotnetOfflineFailure,
|
||||
EventBasedError,
|
||||
EventCancellationError,
|
||||
OffilneDetectionLogicTriggered,
|
||||
OfflineDetectionLogicTriggered,
|
||||
SuppressedAcquisitionError,
|
||||
WebRequestError,
|
||||
WebRequestSent
|
||||
} from '../EventStream/EventStreamEvents';
|
||||
import { getInstallFromContext } from './InstallIdUtilities';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class WebRequestWorker
|
||||
{
|
||||
|
@ -140,7 +139,7 @@ export class WebRequestWorker
|
|||
return true;
|
||||
}).catch((error : any) =>
|
||||
{
|
||||
eventStream.post(new OffilneDetectionLogicTriggered((error as EventCancellationError), `DNS resolution failed at microsoft.com, ${JSON.stringify(error)}.`));
|
||||
eventStream.post(new OfflineDetectionLogicTriggered((error as EventCancellationError), `DNS resolution failed at microsoft.com, ${JSON.stringify(error)}.`));
|
||||
return false;
|
||||
});
|
||||
return couldConnect;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* The .NET Foundation licenses this file to you under the MIT license.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as vscode from 'vscode';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class MockEnvironmentVariableCollection implements vscode.EnvironmentVariableCollection {
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ import { InstallationGraveyard } from '../../Acquisition/InstallationGraveyard';
|
|||
import { CommandExecutorResult } from '../../Utils/CommandExecutorResult';
|
||||
|
||||
const testDefaultTimeoutTimeMs = 60000;
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class MockExtensionContext implements IExtensionState {
|
||||
private values: { [n: string]: any; } = {};
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* The .NET Foundation licenses this file to you under the MIT license.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { IWindowDisplayWorker } from '../../EventStream/IWindowDisplayWorker';
|
||||
/* tslint:disable:no-any */
|
||||
|
||||
export class MockWindowDisplayWorker implements IWindowDisplayWorker {
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "../tslint.json"
|
||||
}
|
|
@ -82,7 +82,7 @@
|
|||
"test": "npm run compile --silent && node ./dist/test/functional/runTest.js",
|
||||
"clean": "rimraf dist",
|
||||
"compile-all": "cd ../vscode-dotnet-runtime-library && npm install && npm run compile && cd ../vscode-dotnet-sdk-extension && npm install && npm run compile",
|
||||
"lint": "tslint -c ../tslint.json '../vscode-dotnet-runtime-library/src/**/*.ts' '../vscode-dotnet-sdk-extension/src/**/*.ts'",
|
||||
"lint": "eslint -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix",
|
||||
"webpack": "webpack --mode development"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -42,7 +42,6 @@ import { dotnetCoreAcquisitionExtensionId } from './DotnetCoreAcquisitionId';
|
|||
import { GlobalInstallerResolver } from 'vscode-dotnet-runtime-library/dist/Acquisition/GlobalInstallerResolver';
|
||||
import { IAcquisitionWorkerContext } from 'vscode-dotnet-runtime-library/dist/Acquisition/IAcquisitionWorkerContext';
|
||||
|
||||
// tslint:disable no-var-requires
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
// Extension constants
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
* Licensed to the .NET Foundation under one or more agreements.
|
||||
* The .NET Foundation licenses this file to you under the MIT license.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
/* tslint:disable:no-any */
|
||||
/* tslint:disable:only-arrow-functions */
|
||||
|
||||
import * as chai from 'chai';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import * as cp from 'child_process';
|
||||
|
@ -38,13 +37,10 @@ import * as extension from '../../extension';
|
|||
import { uninstallSDKExtension } from '../../ExtensionUninstall';
|
||||
import { warn } from 'console';
|
||||
import { InstallTrackerSingleton } from 'vscode-dotnet-runtime-library/dist/Acquisition/InstallTrackerSingleton';
|
||||
import { mock } from 'node:test';
|
||||
|
||||
const standardTimeoutTime = 100000;
|
||||
const assert = chai.assert;
|
||||
chai.use(chaiAsPromised);
|
||||
/* tslint:disable:no-any */
|
||||
/* tslint:disable:no-unsafe-finally */
|
||||
|
||||
const currentSDKVersion = '7.0';
|
||||
suite('DotnetCoreAcquisitionExtension End to End', function ()
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "../tslint.json"
|
||||
}
|
Загрузка…
Ссылка в новой задаче