Skip to content

Commit

Permalink
chore: remove refs to tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Feb 27, 2019
1 parent 498a811 commit a3f3383
Show file tree
Hide file tree
Showing 146 changed files with 329 additions and 370 deletions.
2 changes: 1 addition & 1 deletion benchmark/src/__tests__/benchmark.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Benchmark (SLOW)', function() {
async execute(
title: string,
urlPath: string,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
options?: any,
): Promise<EndpointStats> {
if (!options) options = {};
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/rest-routing/routing-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function givenRouter(router: RestRouter, spec: OpenApiSpec, count: number) {
// Make it not found
group = 'groupX';
}
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const request: any = {
method: 'get',
path: `/my/hello/${group}/version_${i}`,
Expand Down
4 changes: 2 additions & 2 deletions bin/sync-dev-deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ async function syncDevDeps() {

const masterDeps = {
typescript: buildDeps.typescript,
tslint: buildDeps.tslint,
eslint: buildDeps.eslint,
};

// Update typescript & tslint dependencies in individual packages
// Update typescript & eslint dependencies in individual packages
for (const pkg of packages) {
const data = readJsonFile(pkg.manifestLocation);
let modified = false;
Expand Down
2 changes: 1 addition & 1 deletion bin/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Running Code Linter -- Requires @loopback/build so it's bootstrapped
if [ $TASK = "code-lint" ]; then
echo "TASK => LINTING CODE"
lerna bootstrap --scope @loopback/build --scope @loopback/tslint-config
lerna bootstrap --scope @loopback/build --scope @loopback/eslint-config
npm run lint

# Commit Message Linter
Expand Down
2 changes: 1 addition & 1 deletion docs/site/OpenAPI-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ additional model files are generated:
{% include code-caption.html content="src/models/perform-search-body.model.ts" %}

```ts
/* tslint:disable:no-any */
/* eslint-disable @typescript-eslint/no-explicit-any */
import {model, property} from '@loopback/repository';
/**
Expand Down
2 changes: 1 addition & 1 deletion docs/site/Parsing-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class FileUploadController {
else {
resolve({
files: request.files,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fields: (request as any).fields,
});
}
Expand Down
12 changes: 6 additions & 6 deletions examples/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean *example-hello-world*.tgz dist package api-docs",
"verify": "npm pack && tar xf *example-hello-world*.tgz && tree package && npm run clean",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"lint": "npm run prettier:check && npm run eslint",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"eslint": "lb-eslint",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha --allow-console-logs \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
Expand All @@ -43,9 +43,9 @@
"devDependencies": {
"@loopback/build": "^1.3.1",
"@loopback/testlab": "^1.0.7",
"@loopback/tslint-config": "^2.0.1",
"@loopback/eslint-config": "^1.0.0-1",
"@types/node": "^10.11.2",
"tslint": "^5.12.0",
"eslint": "^5.14.1",
"typescript": "^3.3.1"
},
"keywords": [
Expand Down
4 changes: 0 additions & 4 deletions examples/hello-world/tslint.build.json

This file was deleted.

4 changes: 0 additions & 4 deletions examples/hello-world/tslint.json

This file was deleted.

10 changes: 5 additions & 5 deletions examples/log-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export interface LogFn {
(
req: Request,
args: OperationArgs,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any,
startTime?: HighResTime,
): Promise<void>;
Expand Down Expand Up @@ -232,10 +232,10 @@ import {Constructor} from '@loopback/context';
import {EXAMPLE_LOG_BINDINGS} from '../keys';
import {LogComponent} from '../component';

// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function LogMixin<T extends Constructor<any>>(superClass: T) {
return class extends superClass {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(...args: any[]) {
super(...args);
if (this.options && this.options.logLevel) {
Expand Down Expand Up @@ -319,7 +319,7 @@ export class LogActionProvider implements Provider<LogFn> {
const fn = <LogFn>((
req: Request,
args: OperationArgs,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any,
start?: HighResTime,
) => {
Expand All @@ -336,7 +336,7 @@ export class LogActionProvider implements Provider<LogFn> {
private async action(
req: Request,
args: OperationArgs,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any,
start?: HighResTime,
): Promise<void> {
Expand Down
12 changes: 6 additions & 6 deletions examples/log-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean *example-log-extension-*.tgz dist package api-docs",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"lint": "npm run prettier:check && npm run eslint",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"eslint": "lb-eslint",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
Expand All @@ -44,10 +44,10 @@
"devDependencies": {
"@loopback/build": "^1.3.1",
"@loopback/testlab": "^1.0.7",
"@loopback/tslint-config": "^2.0.1",
"@loopback/eslint-config": "^1.0.0-1",
"@types/debug": "^4.1.0",
"@types/node": "^10.11.2",
"tslint": "^5.12.0",
"eslint": "^5.14.1",
"typescript": "^3.3.1"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ describe('log extension acceptance test', () => {
async handle(context: RequestContext): Promise<void> {
const {request, response} = context;

// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let args: any = [];
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let result: any;

try {
Expand Down
4 changes: 2 additions & 2 deletions examples/log-extension/src/mixins/log.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {LogComponent} from '../component';
* class MyApplication extends LogMixin(Application) {}
* ```
*/
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function LogMixin<T extends Constructor<any>>(superClass: T) {
return class extends superClass {
// A mixin class has to take in a type any[] argument!
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(...args: any[]) {
super(...args);
if (this.options && this.options.logLevel) {
Expand Down
4 changes: 2 additions & 2 deletions examples/log-extension/src/providers/log-action.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class LogActionProvider implements Provider<LogFn> {
const fn = <LogFn>((
req: Request,
args: OperationArgs,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any,
start?: HighResTime,
) => {
Expand All @@ -54,7 +54,7 @@ export class LogActionProvider implements Provider<LogFn> {
private async action(
req: Request,
args: OperationArgs,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any,
start?: HighResTime,
): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion examples/log-extension/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface LogFn {
(
req: Request,
args: OperationArgs,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any,
startTime?: HighResTime,
): Promise<void>;
Expand Down
4 changes: 0 additions & 4 deletions examples/log-extension/tslint.build.json

This file was deleted.

4 changes: 0 additions & 4 deletions examples/log-extension/tslint.json

This file was deleted.

12 changes: 6 additions & 6 deletions examples/rpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean dist",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"lint": "npm run prettier:check && npm run eslint",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"eslint": "lb-eslint",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha dist/__tests__/**/*.js",
"posttest": "npm run lint",
Expand All @@ -46,11 +46,11 @@
"devDependencies": {
"@loopback/build": "^1.3.1",
"@loopback/testlab": "^1.0.7",
"@loopback/tslint-config": "^2.0.1",
"@loopback/eslint-config": "^1.0.0-1",
"@types/express": "^4.11.1",
"@types/node": "^10.11.2",
"@types/p-event": "^1.3.0",
"tslint": "^5.12.0",
"eslint": "^5.14.1",
"typescript": "^3.3.1"
}
}
6 changes: 3 additions & 3 deletions examples/rpc-server/src/__tests__/unit/rpc.router.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {expect, sinon} from '@loopback/testlab';

describe('rpcRouter', () => {
describe('routeHandler', () => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let server: any;
let request: express.Request;
let response: express.Response;
Expand Down Expand Up @@ -52,7 +52,7 @@ describe('rpcRouter', () => {
it('throws 500 on unhandled error', async () => {
server.get.resolves(
new class extends FakeController {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getFoo(input: any): string {
throw new Error('>:(');
}
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('rpcRouter', () => {
}

class FakeController {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getFoo(input: any) {
return `Hello, ${input.name}!`;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc-server/src/rpc.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type Controller = {

function sendErrResponse(
resp: express.Response,
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
send: any,
statusCode: number,
) {
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc-server/src/rpc.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ export class RPCServer extends Context implements Server {

export type RPCServerConfig = {
port?: number;
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
};
4 changes: 0 additions & 4 deletions examples/rpc-server/tslint.build.json

This file was deleted.

4 changes: 0 additions & 4 deletions examples/rpc-server/tslint.json

This file was deleted.

12 changes: 6 additions & 6 deletions examples/soap-calculator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean *example-soap*.tgz dist package api-docs dist",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"lint": "npm run prettier:check && npm run eslint",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"eslint": "lb-eslint",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
Expand Down Expand Up @@ -54,12 +54,12 @@
"devDependencies": {
"@loopback/build": "^1.3.1",
"@loopback/testlab": "^1.0.7",
"@loopback/tslint-config": "^2.0.1",
"@loopback/eslint-config": "^1.0.0-1",
"@types/mocha": "^5.0.0",
"@types/node": "^10.11.2",
"mocha": "^6.0.0",
"source-map-support": "^0.5.5",
"tslint": "^5.12.0",
"eslint": "^5.14.1",
"typescript": "^3.3.1"
}
}
4 changes: 0 additions & 4 deletions examples/soap-calculator/tslint.build.json

This file was deleted.

4 changes: 0 additions & 4 deletions examples/soap-calculator/tslint.json

This file was deleted.

12 changes: 6 additions & 6 deletions examples/todo-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean *example-todo-list*.tgz dist package api-docs",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"lint": "npm run prettier:check && npm run eslint",
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"eslint": "lb-eslint",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
Expand Down Expand Up @@ -51,11 +51,11 @@
"@loopback/build": "^1.3.1",
"@loopback/http-caching-proxy": "^1.0.7",
"@loopback/testlab": "^1.0.7",
"@loopback/tslint-config": "^2.0.1",
"@loopback/eslint-config": "^1.0.0-1",
"@types/lodash": "^4.14.109",
"@types/node": "^10.11.2",
"lodash": "^4.17.10",
"tslint": "^5.12.0",
"eslint": "^5.14.1",
"typescript": "^3.3.1"
},
"keywords": [
Expand Down
Loading

0 comments on commit a3f3383

Please sign in to comment.