diff --git a/.eslintignore b/.eslintignore index f7d6ff6a17e..f9573fb51f0 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,5 @@ docs/ lisk/ templates/ types/ +examples/ +**/*.d.ts \ No newline at end of file diff --git a/.nycrc b/.nycrc deleted file mode 120000 index ca9add23011..00000000000 --- a/.nycrc +++ /dev/null @@ -1 +0,0 @@ -templates/.nycrc.tmpl \ No newline at end of file diff --git a/Jenkinsfile.sonar b/Jenkinsfile.sonar deleted file mode 100644 index e4883afe2fe..00000000000 --- a/Jenkinsfile.sonar +++ /dev/null @@ -1,54 +0,0 @@ -@Library('lisk-jenkins') _ - -pipeline { - agent { node { label 'lisk-sdk' } } - stages { - stage('Install TypeScript') { - steps { - nvm(getNodejsVersion()) { - sh 'npm ci' - } - } - } - stage('Run sonar-scanner') { - steps { - nvm(getNodejsVersion()) { - script { - def scannerHome = tool 'sonar'; - withSonarQubeEnv() { - if (env.CHANGE_ID) { - sh """#!/bin/bash - ${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=LiskHQ_lisk-sdk \ - -Dsonar.organization=liskhq \ - -Dsonar.exclusions=**/test/**,**/migrations/**,**/entities/**,reset_mem_tables.sql,**/protocol-specs/**,**/templates/browsertest.tmpl/**,**/lisk-p2p/examples/** \ - -Dsonar.scm.revision=$GIT_COMMIT \ - -Dsonar.projectVersion=\${GIT_COMMIT::7} \ - -Dsonar.pullrequest.key=$CHANGE_ID \ - -Dsonar.pullrequest.branch=$CHANGE_BRANCH \ - -Dsonar.pullrequest.base=$CHANGE_TARGET \ - -Dsonar.typescript.tsconfigPath=tsconfig.json - """ - } else { - sh """#!/bin/bash - ${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=LiskHQ_lisk-sdk \ - -Dsonar.organization=liskhq \ - -Dsonar.exclusions=**/test/**,**/migrations/**,**/entities/**,reset_mem_tables.sql,**/protocol-specs/**,**/templates/browsertest.tmpl/**,**/lisk-p2p/examples/** \ - -Dsonar.scm.revision=$GIT_COMMIT \ - -Dsonar.projectVersion=\${GIT_COMMIT::7} \ - -Dsonar.branch.name=$GIT_BRANCH \ - -Dsonar.typescript.tsconfigPath=tsconfig.json - """ - } - } - } - } - } - } - } - post { - cleanup { - cleanWs() - } - } -} -// vim: filetype=groovy diff --git a/commander/package.json b/commander/package.json index 614f2e4b1f7..b3fecf6d3cd 100644 --- a/commander/package.json +++ b/commander/package.json @@ -30,7 +30,7 @@ "scripts": { "start": "ts-node src/index.js", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=./test/tsconfig.json nyc mocha", "test:watch": "npm run test:local -- --watch", diff --git a/commander/src/commands/config/set.ts b/commander/src/commands/config/set.ts index 7ecd12a481f..c14a385d2b8 100644 --- a/commander/src/commands/config/set.ts +++ b/commander/src/commands/config/set.ts @@ -193,7 +193,6 @@ export default class SetCommand extends BaseCommand { { name: 'variable', required: true, - // tslint:disable-next-line array-type options: CONFIG_VARIABLES as Array, description: '', }, diff --git a/commander/src/commands/core/install.ts b/commander/src/commands/core/install.ts index d4ae034b974..48f027ad37d 100644 --- a/commander/src/commands/core/install.ts +++ b/commander/src/commands/core/install.ts @@ -321,7 +321,6 @@ export default class InstallCommand extends BaseCommand { await tasks.run(); if (!noStart) { - // tslint:disable-next-line await-promise await StartCommand.run([name]); const newInstance = await describeApplication(name); this.print(newInstance); diff --git a/commander/src/commands/core/restart.ts b/commander/src/commands/core/restart.ts index 9899dfd65c9..4d9c9c533be 100644 --- a/commander/src/commands/core/restart.ts +++ b/commander/src/commands/core/restart.ts @@ -61,9 +61,7 @@ export default class RestartCommand extends BaseCommand { return; } - // tslint:disable-next-line await-promise await StopCommand.run([name]); - // tslint:disable-next-line await-promise await StartCommand.run([name]); } } diff --git a/commander/src/commands/core/start/index.ts b/commander/src/commands/core/start/index.ts index 3845dff9512..02f7275eecb 100644 --- a/commander/src/commands/core/start/index.ts +++ b/commander/src/commands/core/start/index.ts @@ -66,9 +66,7 @@ export default class StartCommand extends BaseCommand { return; } - // tslint:disable-next-line await-promise await CacheCommand.run([name]); - // tslint:disable-next-line await-promise await DatabaseCommand.run([name]); const tasks = new Listr([ diff --git a/commander/src/commands/core/stop/index.ts b/commander/src/commands/core/stop/index.ts index 1c7f747ddaf..f4345a46d30 100644 --- a/commander/src/commands/core/stop/index.ts +++ b/commander/src/commands/core/stop/index.ts @@ -63,9 +63,7 @@ export default class StopCommand extends BaseCommand { return; } - // tslint:disable-next-line await-promise await CacheCommand.run([name]); - // tslint:disable-next-line await-promise await DatabaseCommand.run([name]); const tasks = new Listr([ diff --git a/commander/src/commands/core/uninstall.ts b/commander/src/commands/core/uninstall.ts index 8bd7af558ee..0f219bf63ef 100644 --- a/commander/src/commands/core/uninstall.ts +++ b/commander/src/commands/core/uninstall.ts @@ -68,7 +68,6 @@ export default class UnInstallCommand extends BaseCommand { return; } - // tslint:disable-next-line await-promise await StopCommand.run([name]); const { installationPath, network } = instance; diff --git a/commander/src/commands/transaction/create.ts b/commander/src/commands/transaction/create.ts index a0b99478493..8842f6b3325 100644 --- a/commander/src/commands/transaction/create.ts +++ b/commander/src/commands/transaction/create.ts @@ -108,7 +108,6 @@ export default class CreateCommand extends BaseCommand { ? typeNumberMap[type] : type; const resolvedFlags = Object.entries(flags).reduce(resolveFlags, []); - // tslint:disable-next-line await-promise await typeClassMap[commandType].run([...argv, ...resolvedFlags]); } } diff --git a/commander/src/commands/transaction/create/pom.ts b/commander/src/commands/transaction/create/pom.ts index 6195413e6fc..373ffb60572 100644 --- a/commander/src/commands/transaction/create/pom.ts +++ b/commander/src/commands/transaction/create/pom.ts @@ -137,7 +137,6 @@ export default class PoMCommand extends BaseCommand { throw new ValidationError('Enter a valid fee in number string format.'); } - // tslint:disable-next-line no-let let header1: RawHeader; try { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment @@ -149,7 +148,6 @@ export default class PoMCommand extends BaseCommand { ); } - // tslint:disable-next-line no-let let header2: RawHeader; try { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment diff --git a/commander/src/commands/transaction/sign.ts b/commander/src/commands/transaction/sign.ts index 11d3ea598e4..70110fbefd1 100644 --- a/commander/src/commands/transaction/sign.ts +++ b/commander/src/commands/transaction/sign.ts @@ -48,7 +48,6 @@ const getPassphrasesFromPrompt = async ( numberOfPassphrases = 1, ): Promise> => { const passphrases = []; - // tslint:disable-next-line: no-let for (let index = 0; index < numberOfPassphrases; index += 1) { const passphrase = await getPassphraseFromPrompt('passphrase', true); passphrases.push(passphrase); diff --git a/commander/src/utils/config.ts b/commander/src/utils/config.ts index fae5db950ff..fea1edbeba2 100644 --- a/commander/src/utils/config.ts +++ b/commander/src/utils/config.ts @@ -31,7 +31,6 @@ export type WritableValue = | object; interface ConfigOptionsIndex { - // tslint:disable-next-line readonly-keyword [key: string]: WritableValue; } @@ -62,13 +61,11 @@ const attemptCallWithError = (fn: () => T, errorMessage: string): T => { const attemptToCreateDir = (dirPath: string): void => { const fn = fs.mkdirSync.bind(undefined, dirPath); - // tslint:disable-next-line invalid-void attemptCallWithError(fn, fileWriteErrorMessage(dirPath)); }; const attemptToCreateFile = (filePath: string): void => { const fn = writeJSONSync.bind(undefined, filePath, defaultConfig); - // tslint:disable-next-line invalid-void attemptCallWithError(fn, fileWriteErrorMessage(filePath)); }; @@ -98,7 +95,6 @@ const attemptToValidateConfig = (config: object, filePath: string): void => { }; const errorMessage = `Config file seems to be corrupted: missing required keys. Please check ${filePath} or delete the file so we can create a new one from defaults.`; - // tslint:disable-next-line invalid-void attemptCallWithError(fn, errorMessage); }; diff --git a/commander/src/utils/query.ts b/commander/src/utils/query.ts index 1b535d020eb..0ccac962e09 100644 --- a/commander/src/utils/query.ts +++ b/commander/src/utils/query.ts @@ -1,5 +1,4 @@ import { APIClient } from '@liskhq/lisk-api-client'; -// tslint:disable-next-line no-submodule-imports import { NodeResource } from '@liskhq/lisk-api-client/dist-node/resources/node'; /* diff --git a/commander/src/utils/reader.ts b/commander/src/utils/reader.ts index 887de320fd0..edfbdbe59fe 100644 --- a/commander/src/utils/reader.ts +++ b/commander/src/utils/reader.ts @@ -91,7 +91,6 @@ export const getPassphraseFromPrompt = async ( ), 'Warning: ', ); - // tslint:disable-next-line no-console console.warn(passphraseWarning); } }); @@ -116,7 +115,6 @@ export const isFileSource = (source?: string): boolean => { } const delimiter = ':'; const sourceParts = source.split(delimiter); - // tslint:disable-next-line no-magic-numbers if (sourceParts.length === 2 && sourceParts[0] === 'file') { return true; } @@ -156,7 +154,6 @@ const DEFAULT_TIMEOUT = 100; export const readStdIn = async (): Promise => { const readFromStd = new Promise((resolve, reject) => { - // tslint:disable readonly-array const lines: string[] = []; const rl = readline.createInterface({ input: process.stdin }); diff --git a/commander/src/utils/tablify.ts b/commander/src/utils/tablify.ts index 450a04afa2a..0a267265c17 100644 --- a/commander/src/utils/tablify.ts +++ b/commander/src/utils/tablify.ts @@ -49,7 +49,6 @@ const getKeyValueArray = (array: ReadonlyArray) => ? array.map(getKeyValueObject).join('\n\n') : array.join('\n'); -// tslint:disable-next-line readonly-array const addValuesToTable = (table: object[], data: object) => { Object.entries(data).forEach(([key, values]) => { const strValue = Array.isArray(values) @@ -71,7 +70,6 @@ export const tablify = (data: ReadonlyArray | object) => { if (Array.isArray(data)) { data.forEach((value, key) => { - // tslint:disable-next-line readonly-array const cell: Cell[] = [ { colSpan: 2, diff --git a/commander/test/utils/tablify.ts b/commander/test/utils/tablify.ts index b6200eac723..a10d7ce0234 100644 --- a/commander/test/utils/tablify.ts +++ b/commander/test/utils/tablify.ts @@ -106,7 +106,6 @@ describe('tablify utils', () => { describe('a cyclic object', () => { it('should throw an error', () => { - // tslint:disable-next-line no-any const printValue: any = { root: 'value', nested: { diff --git a/elements/lisk-api-client/package.json b/elements/lisk-api-client/package.json index 003b7b404c8..7339d511f9c 100644 --- a/elements/lisk-api-client/package.json +++ b/elements/lisk-api-client/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-bft/package.json b/elements/lisk-bft/package.json index b8585015fca..daad5d663a5 100644 --- a/elements/lisk-bft/package.json +++ b/elements/lisk-bft/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-bft/src/finality_manager.ts b/elements/lisk-bft/src/finality_manager.ts index 4452a808b0e..3413f54f5f1 100644 --- a/elements/lisk-bft/src/finality_manager.ts +++ b/elements/lisk-bft/src/finality_manager.ts @@ -82,7 +82,6 @@ export class FinalityManager extends EventEmitter { // Set constants this.activeDelegates = activeDelegates; - /* tslint:disable:no-magic-numbers */ // Threshold to consider a block pre-voted this.preVoteThreshold = Math.ceil((this.activeDelegates * 2) / 3); @@ -104,8 +103,6 @@ export class FinalityManager extends EventEmitter { this.state = {}; this.preVotes = {}; this.preCommits = {}; - - /* tslint:enable:no-magic-numbers */ } public async addBlockHeader( @@ -282,7 +279,6 @@ export class FinalityManager extends EventEmitter { throw new Error('Cannot find a block to recompute'); } - // tslint:disable-next-line no-let for (let i = blockHeaders.length - 1; i >= 0; i -= 1) { const blockHeader = blockHeaders[i]; const bftBlockHeader = blockHeaders.slice(i + 1); @@ -332,9 +328,7 @@ export class FinalityManager extends EventEmitter { } // Order the two block headers such that earlierBlock must be forged first - // tslint:disable-next-line no-let let earlierBlock = delegateLastBlock; - // tslint:disable-next-line no-let let laterBlock = blockHeader; const higherMaxHeightPreviouslyForged = earlierBlock.maxHeightPreviouslyForged > @@ -402,7 +396,6 @@ export class FinalityManager extends EventEmitter { header: BlockHeader, bftApplicableBlocks: ReadonlyArray, ): number { - // tslint:disable-next-line no-let let needleHeight = Math.max( header.maxHeightPreviouslyForged, header.height - this.processingThreshold, @@ -414,7 +407,6 @@ export class FinalityManager extends EventEmitter { header.height - this.processingThreshold, ); // Hold reference for the previously forged height - // tslint:disable-next-line no-let let previousBlockHeight = header.maxHeightPreviouslyForged; const blocksIncludingCurrent = [header, ...bftApplicableBlocks]; @@ -450,7 +442,6 @@ export class FinalityManager extends EventEmitter { } private _cleanup(): void { - // tslint:disable:no-delete no-dynamic-delete Object.keys(this.preVotes) .slice(0, this.maxHeaders * -1) .forEach(key => { @@ -462,6 +453,5 @@ export class FinalityManager extends EventEmitter { .forEach(key => { delete this.preCommits[key]; }); - // tslint:enable:no-delete no-dynamic-delete } } diff --git a/elements/lisk-bft/src/types.ts b/elements/lisk-bft/src/types.ts index f512c987c8f..03a35d51cf5 100644 --- a/elements/lisk-bft/src/types.ts +++ b/elements/lisk-bft/src/types.ts @@ -75,8 +75,6 @@ export interface StateStore { export class BFTError extends Error {} -/* tslint:disable:max-classes-per-file */ - export class BFTChainDisjointError extends BFTError { public constructor() { super( diff --git a/elements/lisk-chain/package.json b/elements/lisk-chain/package.json index 5e69cde1293..d5a22332f31 100644 --- a/elements/lisk-chain/package.json +++ b/elements/lisk-chain/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-client/.eslintignore b/elements/lisk-client/.eslintignore new file mode 100644 index 00000000000..24cde990603 --- /dev/null +++ b/elements/lisk-client/.eslintignore @@ -0,0 +1,3 @@ +dist-node +dist-browser +jest.config.js diff --git a/elements/lisk-client/.eslintrc.js b/elements/lisk-client/.eslintrc.js new file mode 100644 index 00000000000..8b7fd410b8d --- /dev/null +++ b/elements/lisk-client/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: '../../.eslintrc.js', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, +}; diff --git a/elements/lisk-client/.nycrc b/elements/lisk-client/.nycrc deleted file mode 120000 index 42043af1cf1..00000000000 --- a/elements/lisk-client/.nycrc +++ /dev/null @@ -1 +0,0 @@ -../../templates/.nycrc-ts.tmpl \ No newline at end of file diff --git a/elements/lisk-client/package.json b/elements/lisk-client/package.json index a903eea42b7..ca9c1ee5ecd 100644 --- a/elements/lisk-client/package.json +++ b/elements/lisk-client/package.json @@ -28,8 +28,8 @@ "uglify": "uglifyjs -nm -o ./dist-browser/index.min.js ./dist-browser/index.js", "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "tslint --format verbose --project .", - "lint:fix": "npm run lint -- --fix", + "lint": "eslint --ext .js,.ts .", + "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", "test:node": "npm run build:check", @@ -53,6 +53,13 @@ "devDependencies": { "@types/jest": "25.1.3", "@types/jest-when": "2.7.0", + "@typescript-eslint/eslint-plugin": "2.28.0", + "@typescript-eslint/parser": "2.28.0", + "eslint": "6.8.0", + "eslint-config-lisk-base": "1.2.2", + "eslint-config-prettier": "6.10.0", + "eslint-plugin-import": "2.20.1", + "eslint-plugin-jest": "23.8.2", "browserify": "16.5.0", "jest": "25.1.0", "jest-extended": "0.11.5", @@ -61,9 +68,6 @@ "source-map-support": "0.5.16", "ts-node": "8.6.2", "tsconfig-paths": "3.9.0", - "tslint": "6.0.0", - "tslint-config-prettier": "1.18.0", - "tslint-immutable": "6.0.1", "typescript": "3.8.3", "uglify-es": "3.3.9" } diff --git a/elements/lisk-client/src/index.ts b/elements/lisk-client/src/index.ts index 402e6accb65..4340f566526 100644 --- a/elements/lisk-client/src/index.ts +++ b/elements/lisk-client/src/index.ts @@ -18,7 +18,6 @@ import * as cryptographyModule from '@liskhq/lisk-cryptography'; import * as passphraseModule from '@liskhq/lisk-passphrase'; import * as transactionsModule from '@liskhq/lisk-transactions'; -// tslint:disable-next-line variable-name export const APIClient = APIClientModule; export const constants = constantsModule; export const cryptography = cryptographyModule; @@ -28,7 +27,6 @@ export const transactions = transactionsModule; // See https://github.com/LiskHQ/lisk-sdk/issues/3925#issuecomment-508664703 export const transaction = transactionsModule; -// tslint:disable-next-line no-default-export export default { APIClient, constants, diff --git a/elements/lisk-client/test/.eslintrc.js b/elements/lisk-client/test/.eslintrc.js new file mode 100644 index 00000000000..a98dfb6d823 --- /dev/null +++ b/elements/lisk-client/test/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: '../../../.eslintrc.test.js', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, +}; diff --git a/elements/lisk-client/test/tslint.json b/elements/lisk-client/test/tslint.json deleted file mode 120000 index cfef1680c62..00000000000 --- a/elements/lisk-client/test/tslint.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/test/tslint.json.tmpl \ No newline at end of file diff --git a/elements/lisk-client/tslint.json b/elements/lisk-client/tslint.json deleted file mode 120000 index 7566d21211d..00000000000 --- a/elements/lisk-client/tslint.json +++ /dev/null @@ -1 +0,0 @@ -../../templates/tslint.json.tmpl \ No newline at end of file diff --git a/elements/lisk-constants/package.json b/elements/lisk-constants/package.json index 71723c9f28b..6fcda701002 100644 --- a/elements/lisk-constants/package.json +++ b/elements/lisk-constants/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-cryptography/package.json b/elements/lisk-cryptography/package.json index 2fc26287cc8..ed5a850e5aa 100644 --- a/elements/lisk-cryptography/package.json +++ b/elements/lisk-cryptography/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-cryptography/src/buffer.ts b/elements/lisk-cryptography/src/buffer.ts index cb12079f889..5b9c510d42d 100644 --- a/elements/lisk-cryptography/src/buffer.ts +++ b/elements/lisk-cryptography/src/buffer.ts @@ -83,7 +83,6 @@ export const hexToBuffer = (hex: string, argumentName = 'Argument'): Buffer => { if (!matchedHex || matchedHex.length !== hex.length) { throw new TypeError(`${argumentName} must be a valid hex string.`); } - // tslint:disable-next-line no-magic-numbers if (matchedHex.length % 2 !== 0) { throw new TypeError( `${argumentName} must have a valid length of hex string.`, diff --git a/elements/lisk-cryptography/src/hash_onion.ts b/elements/lisk-cryptography/src/hash_onion.ts index d1f0119a4f4..9b000ea42d2 100644 --- a/elements/lisk-cryptography/src/hash_onion.ts +++ b/elements/lisk-cryptography/src/hash_onion.ts @@ -39,11 +39,9 @@ export const hashOnion = ( throw new Error('Invalid count. Count must be multiple of distance'); } - // tslint:disable-next-line no-let let previousHash = seed; const hashes = [seed]; - // tslint:disable-next-line no-let for (let i = 1; i <= count; i += 1) { const nextHash = hash(previousHash).slice(0, HASH_SIZE); if (i % distance === 0) { diff --git a/elements/lisk-cryptography/types/sodium-native/index.d.ts b/elements/lisk-cryptography/types/sodium-native/index.d.ts index 3cb4942c2b2..fc75849fb72 100644 --- a/elements/lisk-cryptography/types/sodium-native/index.d.ts +++ b/elements/lisk-cryptography/types/sodium-native/index.d.ts @@ -1,4 +1,3 @@ -// tslint:disable only-arrow-functions variable-name declare module 'sodium-native' { export const crypto_box_MACBYTES: number; export const crypto_sign_BYTES: number; diff --git a/elements/lisk-cryptography/types/varuint-bitcoin/index.d.ts b/elements/lisk-cryptography/types/varuint-bitcoin/index.d.ts index 7ef8af856ef..2308f56bada 100644 --- a/elements/lisk-cryptography/types/varuint-bitcoin/index.d.ts +++ b/elements/lisk-cryptography/types/varuint-bitcoin/index.d.ts @@ -1,4 +1,3 @@ -// tslint:disable only-arrow-functions declare module 'varuint-bitcoin' { export function encode(num: number, buffer?: Buffer, offset?: number): Buffer; } diff --git a/elements/lisk-dpos/package.json b/elements/lisk-dpos/package.json index 9a3bacb84bc..b53cd4d666e 100644 --- a/elements/lisk-dpos/package.json +++ b/elements/lisk-dpos/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-elements/.eslintignore b/elements/lisk-elements/.eslintignore new file mode 100644 index 00000000000..1a7ff6151f4 --- /dev/null +++ b/elements/lisk-elements/.eslintignore @@ -0,0 +1,3 @@ +dist-node +jest.config.js +.eslintrc.js \ No newline at end of file diff --git a/elements/lisk-elements/.eslintrc.js b/elements/lisk-elements/.eslintrc.js new file mode 100644 index 00000000000..8b7fd410b8d --- /dev/null +++ b/elements/lisk-elements/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: '../../.eslintrc.js', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, +}; diff --git a/elements/lisk-elements/.nycrc b/elements/lisk-elements/.nycrc deleted file mode 120000 index 42043af1cf1..00000000000 --- a/elements/lisk-elements/.nycrc +++ /dev/null @@ -1 +0,0 @@ -../../templates/.nycrc-ts.tmpl \ No newline at end of file diff --git a/elements/lisk-elements/package.json b/elements/lisk-elements/package.json index 72f74def687..7719c06a8a0 100644 --- a/elements/lisk-elements/package.json +++ b/elements/lisk-elements/package.json @@ -24,8 +24,8 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "tslint --format verbose --project .", - "lint:fix": "npm run lint -- --fix", + "lint": "eslint --ext .js,.ts .", + "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", "prebuild": "rm -r dist-node/* || mkdir dist-node || true", @@ -47,6 +47,13 @@ "devDependencies": { "@types/jest": "25.1.3", "@types/jest-when": "2.7.0", + "@typescript-eslint/eslint-plugin": "2.28.0", + "@typescript-eslint/parser": "2.28.0", + "eslint": "6.8.0", + "eslint-config-lisk-base": "1.2.2", + "eslint-config-prettier": "6.10.0", + "eslint-plugin-import": "2.20.1", + "eslint-plugin-jest": "23.8.2", "jest": "25.1.0", "jest-extended": "0.11.5", "jest-when": "2.7.0", @@ -54,9 +61,6 @@ "source-map-support": "0.5.16", "ts-node": "8.6.2", "tsconfig-paths": "3.9.0", - "tslint": "6.0.0", - "tslint-config-prettier": "1.18.0", - "tslint-immutable": "6.0.1", "typescript": "3.8.3" } } diff --git a/elements/lisk-elements/test/.eslintrc.js b/elements/lisk-elements/test/.eslintrc.js new file mode 100644 index 00000000000..a98dfb6d823 --- /dev/null +++ b/elements/lisk-elements/test/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: '../../../.eslintrc.test.js', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, +}; diff --git a/elements/lisk-elements/test/tslint.json b/elements/lisk-elements/test/tslint.json deleted file mode 120000 index cfef1680c62..00000000000 --- a/elements/lisk-elements/test/tslint.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/test/tslint.json.tmpl \ No newline at end of file diff --git a/elements/lisk-elements/tslint.json b/elements/lisk-elements/tslint.json deleted file mode 120000 index 7566d21211d..00000000000 --- a/elements/lisk-elements/tslint.json +++ /dev/null @@ -1 +0,0 @@ -../../templates/tslint.json.tmpl \ No newline at end of file diff --git a/elements/lisk-p2p/examples/echo/node1.ts b/elements/lisk-p2p/examples/echo/node1.ts index cd071dc8f22..73a534115bb 100644 --- a/elements/lisk-p2p/examples/echo/node1.ts +++ b/elements/lisk-p2p/examples/echo/node1.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { EVENT_MESSAGE_RECEIVED, P2P, diff --git a/elements/lisk-p2p/examples/echo/node2.ts b/elements/lisk-p2p/examples/echo/node2.ts index aeef252990b..9eabe4d3772 100644 --- a/elements/lisk-p2p/examples/echo/node2.ts +++ b/elements/lisk-p2p/examples/echo/node2.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { EVENT_MESSAGE_RECEIVED, P2P, diff --git a/elements/lisk-p2p/examples/echo/node3.ts b/elements/lisk-p2p/examples/echo/node3.ts index cd071dc8f22..73a534115bb 100644 --- a/elements/lisk-p2p/examples/echo/node3.ts +++ b/elements/lisk-p2p/examples/echo/node3.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { EVENT_MESSAGE_RECEIVED, P2P, diff --git a/elements/lisk-p2p/examples/echo/run.ts b/elements/lisk-p2p/examples/echo/run.ts index 47b5c192aed..e8fe5d3abdc 100644 --- a/elements/lisk-p2p/examples/echo/run.ts +++ b/elements/lisk-p2p/examples/echo/run.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { p2p as firstP2P, run as runNode1 } from './node1'; import { p2p as secondP2P, run as runNode2 } from './node2'; import { p2p as thirdP2P, run as runNode3 } from './node3'; diff --git a/elements/lisk-p2p/examples/find-city-game/node1.ts b/elements/lisk-p2p/examples/find-city-game/node1.ts index 93c6320505a..70b1cd17581 100644 --- a/elements/lisk-p2p/examples/find-city-game/node1.ts +++ b/elements/lisk-p2p/examples/find-city-game/node1.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { EVENT_CONNECT_OUTBOUND, EVENT_MESSAGE_RECEIVED, diff --git a/elements/lisk-p2p/examples/find-city-game/node2.ts b/elements/lisk-p2p/examples/find-city-game/node2.ts index d496ca7ff25..120ab3ffcee 100644 --- a/elements/lisk-p2p/examples/find-city-game/node2.ts +++ b/elements/lisk-p2p/examples/find-city-game/node2.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { EVENT_CONNECT_OUTBOUND, EVENT_MESSAGE_RECEIVED, diff --git a/elements/lisk-p2p/examples/find-city-game/node3.ts b/elements/lisk-p2p/examples/find-city-game/node3.ts index e20a280719f..af447564391 100644 --- a/elements/lisk-p2p/examples/find-city-game/node3.ts +++ b/elements/lisk-p2p/examples/find-city-game/node3.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { EVENT_CONNECT_OUTBOUND, EVENT_MESSAGE_RECEIVED, diff --git a/elements/lisk-p2p/examples/find-city-game/run.ts b/elements/lisk-p2p/examples/find-city-game/run.ts index a35f2ca206f..0c929e72956 100644 --- a/elements/lisk-p2p/examples/find-city-game/run.ts +++ b/elements/lisk-p2p/examples/find-city-game/run.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable import { p2p as firstP2P, run as runNode1 } from './node1'; import { p2p as secondP2P, run as runNode2 } from './node2'; import { p2p as thirdP2P, run as runNode3 } from './node3'; diff --git a/elements/lisk-p2p/examples/lisk-networks/connect_to_devnet.ts b/elements/lisk-p2p/examples/lisk-networks/connect_to_devnet.ts index 2a2c93d5b45..6ab2375770e 100644 --- a/elements/lisk-p2p/examples/lisk-networks/connect_to_devnet.ts +++ b/elements/lisk-p2p/examples/lisk-networks/connect_to_devnet.ts @@ -27,7 +27,6 @@ import { P2PConfig, P2PNodeInfo, } from '../../src'; -// tslint:disable: no-console // Node info for devnet const nodeInfo: P2PNodeInfo = { os: platform(), diff --git a/elements/lisk-p2p/examples/lisk-networks/connect_to_mainnet.ts b/elements/lisk-p2p/examples/lisk-networks/connect_to_mainnet.ts index c07057ee084..870c36faaa2 100644 --- a/elements/lisk-p2p/examples/lisk-networks/connect_to_mainnet.ts +++ b/elements/lisk-p2p/examples/lisk-networks/connect_to_mainnet.ts @@ -27,7 +27,6 @@ import { P2PConfig, P2PNodeInfo, } from '../../src'; -// tslint:disable: no-console // Node info for mainnet const nodeInfo: P2PNodeInfo = { os: platform(), diff --git a/elements/lisk-p2p/examples/lisk-networks/connect_to_testnet.ts b/elements/lisk-p2p/examples/lisk-networks/connect_to_testnet.ts index 9d167fbcfa7..4f60f99810c 100644 --- a/elements/lisk-p2p/examples/lisk-networks/connect_to_testnet.ts +++ b/elements/lisk-p2p/examples/lisk-networks/connect_to_testnet.ts @@ -27,7 +27,6 @@ import { P2PConfig, P2PNodeInfo, } from '../../src'; -// tslint:disable: no-console // Node info for Testnet const nodeInfo: P2PNodeInfo = { os: platform(), diff --git a/elements/lisk-p2p/package.json b/elements/lisk-p2p/package.json index 8860bf06ade..28fa0f91778 100644 --- a/elements/lisk-p2p/package.json +++ b/elements/lisk-p2p/package.json @@ -25,7 +25,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest --runInBand --forceExit --collectCoverage", "test:unit": "jest --config=./test/unit/jest.config.js", diff --git a/elements/lisk-p2p/src/p2p_request.ts b/elements/lisk-p2p/src/p2p_request.ts index 66c89b25e92..838cb5fcf07 100644 --- a/elements/lisk-p2p/src/p2p_request.ts +++ b/elements/lisk-p2p/src/p2p_request.ts @@ -21,13 +21,9 @@ export interface RequestOptions { readonly id: string; readonly rate: number; productivity: { - // tslint:disable-next-line: readonly-keyword requestCounter: number; - // tslint:disable-next-line: readonly-keyword responseCounter: number; - // tslint:disable-next-line: readonly-keyword responseRate: number; - // tslint:disable-next-line: readonly-keyword lastResponded: number; }; } diff --git a/elements/lisk-p2p/src/peer/base.ts b/elements/lisk-p2p/src/peer/base.ts index 87ce511cab4..e784f821075 100644 --- a/elements/lisk-p2p/src/peer/base.ts +++ b/elements/lisk-p2p/src/peer/base.ts @@ -93,11 +93,9 @@ export enum ConnectionState { OPEN = 'open', CLOSED = 'closed', } -// tslint:disable:readonly-keyword export interface ConnectedPeerInfo extends P2PPeerInfo { internalState: P2PInternalState; } -// tslint:enable:readonly-keyword export interface PeerConfig { readonly connectTimeout?: number; readonly ackTimeout?: number; @@ -146,7 +144,6 @@ export class Peer extends EventEmitter { packet: unknown, respond: (responseError?: Error, responseData?: unknown) => void, ): void => { - // tslint:disable-next-line:no-let let rawRequest; try { rawRequest = validateRPCRequest(packet); @@ -195,7 +192,6 @@ export class Peer extends EventEmitter { // This needs to be an arrow function so that it can be used as a listener. this._handleRawMessage = (packet: unknown) => { - // tslint:disable-next-line:no-let let message; try { message = validateProtocolMessage(packet); @@ -385,7 +381,6 @@ export class Peer extends EventEmitter { } public async fetchAndUpdateStatus(): Promise { - // tslint:disable-next-line:no-let let response: P2PResponsePacket; try { response = await this.request({ diff --git a/elements/lisk-p2p/src/types.ts b/elements/lisk-p2p/src/types.ts index 7e965dd73a5..faa89c63f15 100644 --- a/elements/lisk-p2p/src/types.ts +++ b/elements/lisk-p2p/src/types.ts @@ -46,11 +46,9 @@ export interface P2PPenalty { } export interface P2PSharedState { - // tslint:disable-next-line: no-mixed-interface readonly [key: string]: unknown; } // Disable readonly properties as its going to change -// tslint:disable:readonly-keyword export interface P2PInternalState { dateAdded?: Date; peerKind: PeerKind; @@ -73,7 +71,6 @@ export interface P2PInternalState { connectionKind: ConnectionKind; advertiseAddress: boolean; } -// tslint:enable:readonly-keyword export interface P2PPeerInfo { // String to uniquely identify each peer readonly peerId: string; diff --git a/elements/lisk-p2p/src/utils/misc.ts b/elements/lisk-p2p/src/utils/misc.ts index c2b66c657a9..7eb30e50d10 100644 --- a/elements/lisk-p2p/src/utils/misc.ts +++ b/elements/lisk-p2p/src/utils/misc.ts @@ -32,7 +32,6 @@ interface AddressBytes { readonly dBytes: Buffer; } -/* tslint:disable no-magic-numbers */ export const getIPGroup = (address: string, groupNumber: number): number => { if (groupNumber > 3) { throw new Error('Invalid IP group.'); @@ -79,7 +78,6 @@ export const isPrivate = (address: string): boolean => export const isLocal = (address: string): boolean => getIPGroup(address, 0) === 127 || address === '0.0.0.0'; -/* tslint:enable no-magic-numbers */ export const getNetwork = (address: string): NETWORK => { if (isLocal(address)) { diff --git a/elements/lisk-p2p/src/utils/select.ts b/elements/lisk-p2p/src/utils/select.ts index a9775fe806b..da795a085e6 100644 --- a/elements/lisk-p2p/src/utils/select.ts +++ b/elements/lisk-p2p/src/utils/select.ts @@ -72,7 +72,6 @@ export const selectPeersForSend = ( ): ReadonlyArray => { const shuffledPeers = shuffle(input.peers); const peerLimit = input.peerLimit as number; - // tslint:disable: no-magic-numbers const halfPeerLimit = Math.round(peerLimit / 2); const outboundPeers = shuffledPeers.filter((peerInfo: P2PPeerInfo) => @@ -87,9 +86,7 @@ export const selectPeersForSend = ( : false, ); - // tslint:disable: no-let let shortestPeersList; - // tslint:disable: no-let let longestPeersList; if (outboundPeers.length < inboundPeers.length) { diff --git a/elements/lisk-passphrase/package.json b/elements/lisk-passphrase/package.json index bf686f000ce..7854259afcc 100644 --- a/elements/lisk-passphrase/package.json +++ b/elements/lisk-passphrase/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-passphrase/test/validation.spec.ts b/elements/lisk-passphrase/test/validation.spec.ts index 83054d635bf..5c5b4d84984 100644 --- a/elements/lisk-passphrase/test/validation.spec.ts +++ b/elements/lisk-passphrase/test/validation.spec.ts @@ -22,7 +22,6 @@ import { locateConsecutiveWhitespaces, } from '../src/validation'; -/* tslint:disable: no-magic-numbers */ describe('passphrase validation', () => { describe('countPassphraseWhitespaces', () => { describe('given a valid passphrase', () => { diff --git a/elements/lisk-transaction-pool/package.json b/elements/lisk-transaction-pool/package.json index 3de9fd8301e..f0d33e2abf9 100644 --- a/elements/lisk-transaction-pool/package.json +++ b/elements/lisk-transaction-pool/package.json @@ -25,7 +25,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-transaction-pool/src/job.ts b/elements/lisk-transaction-pool/src/job.ts index 11ade8ac042..b1632981379 100644 --- a/elements/lisk-transaction-pool/src/job.ts +++ b/elements/lisk-transaction-pool/src/job.ts @@ -51,7 +51,6 @@ export class Job { } private async run(): Promise { - // tslint:disable-next-line:no-loop-statement while (this._active) { await this.callJobAfterTimeout(); } diff --git a/elements/lisk-transaction-pool/src/max_heap.ts b/elements/lisk-transaction-pool/src/max_heap.ts index f69dd1e5251..109284f6700 100644 --- a/elements/lisk-transaction-pool/src/max_heap.ts +++ b/elements/lisk-transaction-pool/src/max_heap.ts @@ -16,7 +16,6 @@ import { MinHeap } from './min_heap'; export class MaxHeap extends MinHeap { protected _moveUp(originalIndex: number): void { - // tslint:disable-next-line no-let let index = originalIndex; const node = this._nodes[index]; while (index > 0) { diff --git a/elements/lisk-transaction-pool/src/transaction_pool.ts b/elements/lisk-transaction-pool/src/transaction_pool.ts index e41847d9af8..41acda30b86 100644 --- a/elements/lisk-transaction-pool/src/transaction_pool.ts +++ b/elements/lisk-transaction-pool/src/transaction_pool.ts @@ -42,7 +42,6 @@ export interface TransactionPoolConfig { readonly minEntranceFeePriority?: bigint; readonly transactionReorganizationInterval?: number; readonly minReplacementFeeDifference?: bigint; - // tslint:disable-next-line no-mixed-interface readonly applyTransactions: ApplyFunction; } @@ -54,11 +53,8 @@ interface AddTransactionResponse { export const DEFAULT_MAX_TRANSACTIONS = 4096; export const DEFAULT_MAX_TRANSACTIONS_PER_ACCOUNT = 64; export const DEFAULT_MIN_ENTRANCE_FEE_PRIORITY = BigInt(0); -// tslint:disable-next-line no-magic-numbers export const DEFAULT_EXPIRY_TIME = 3 * 60 * 60 * 1000; // 3 hours in ms -// tslint:disable-next-line no-magic-numbers export const DEFAULT_EXPIRE_INTERVAL = 60 * 60 * 1000; // 1 hour in ms -// tslint:disable-next-line no-magic-numbers export const DEFAULT_MINIMUM_REPLACEMENT_FEE_DIFFERENCE = BigInt(10); export const DEFAULT_REORGANIZE_TIME = 500; export const events = { @@ -66,7 +62,6 @@ export const events = { }; // FIXME: Remove this once implemented -// tslint:disable export class TransactionPool { public events: EventEmitter; diff --git a/elements/lisk-transactions/package.json b/elements/lisk-transactions/package.json index 495eea360bb..a7b8d30c1ec 100644 --- a/elements/lisk-transactions/package.json +++ b/elements/lisk-transactions/package.json @@ -24,7 +24,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/elements/lisk-transactions/src/10_delegate_transaction.ts b/elements/lisk-transactions/src/10_delegate_transaction.ts index 76308312d49..c4d02a31b44 100644 --- a/elements/lisk-transactions/src/10_delegate_transaction.ts +++ b/elements/lisk-transactions/src/10_delegate_transaction.ts @@ -140,7 +140,6 @@ export class DelegateTransaction extends BaseTransaction { store: StateStore, ): Promise> { const sender = await store.account.get(this.senderId); - // tslint:disable-next-line:no-null-keyword sender.username = null; sender.isDelegate = 0; store.account.set(sender.address, sender); diff --git a/elements/lisk-transactions/src/12_multisignature_transaction.ts b/elements/lisk-transactions/src/12_multisignature_transaction.ts index 53f2c73adaf..d4c67583cfb 100644 --- a/elements/lisk-transactions/src/12_multisignature_transaction.ts +++ b/elements/lisk-transactions/src/12_multisignature_transaction.ts @@ -85,9 +85,7 @@ const setMemberAccounts = async ( }; export interface MultiSignatureAsset { - // tslint:disable-next-line: readonly-keyword mandatoryKeys: Array>; - // tslint:disable-next-line: readonly-keyword optionalKeys: Array>; readonly numberOfSignatures: number; } @@ -378,7 +376,6 @@ export class MultisignatureTransaction extends BaseTransaction { const sortedMandatoryKeys = [...mandatoryKeys].sort(); // eslint-disable-next-line @typescript-eslint/require-array-sort-compare const sortedOptionalKeys = [...optionalKeys].sort(); - // tslint:disable-next-line: no-let for (let i = 0; i < sortedMandatoryKeys.length; i += 1) { if (mandatoryKeys[i] !== sortedMandatoryKeys[i]) { errors.push( @@ -393,7 +390,6 @@ export class MultisignatureTransaction extends BaseTransaction { } } - // tslint:disable-next-line: no-let for (let i = 0; i < sortedOptionalKeys.length; i += 1) { if (optionalKeys[i] !== sortedOptionalKeys[i]) { errors.push( diff --git a/elements/lisk-transactions/src/13_vote_transaction.ts b/elements/lisk-transactions/src/13_vote_transaction.ts index fab41923427..f9d4dbe2870 100644 --- a/elements/lisk-transactions/src/13_vote_transaction.ts +++ b/elements/lisk-transactions/src/13_vote_transaction.ts @@ -62,7 +62,6 @@ const voteAssetFormatSchema = { const SIZE_INT64 = 8; const SIZE_UINT64 = SIZE_INT64; -// tslint:disable-next-line no-magic-numbers const TEN_UNIT = BigInt(10) * BigInt(10) ** BigInt(8); const MAX_VOTE = 10; const MAX_UNLOCKING = 20; @@ -100,7 +99,6 @@ export class VoteTransaction extends BaseTransaction { }), }; } else { - // tslint:disable-next-line no-object-literal-type-assertion this.asset = { votes: [] }; } } @@ -156,9 +154,7 @@ export class VoteTransaction extends BaseTransaction { schemaErrors, ) as TransactionError[]; - // tslint:disable-next-line no-let let upvoteCount = 0; - // tslint:disable-next-line no-let let downvoteCount = 0; const addressSet = new Set(); for (const vote of this.asset.votes) { diff --git a/elements/lisk-transactions/src/14_unlock_transaction.ts b/elements/lisk-transactions/src/14_unlock_transaction.ts index 7e46365530c..2affe37bd5c 100644 --- a/elements/lisk-transactions/src/14_unlock_transaction.ts +++ b/elements/lisk-transactions/src/14_unlock_transaction.ts @@ -67,7 +67,6 @@ const unlockAssetFormatSchema = { const SIZE_UINT32 = 4; const SIZE_INT64 = 8; const SIZE_UINT64 = SIZE_INT64; -// tslint:disable-next-line no-magic-numbers const AMOUNT_MULTIPLIER_FOR_VOTES = BigInt(10) * BigInt(10) ** BigInt(8); const WAIT_TIME_VOTE = 2000; const WAIT_TIME_SELF_VOTE = 260000; @@ -122,7 +121,6 @@ export class UnlockTransaction extends BaseTransaction { }), }; } else { - // tslint:disable-next-line no-object-literal-type-assertion this.asset = { unlockingObjects: [] }; } } diff --git a/elements/lisk-transactions/src/15_proof_of_misbehavior_transaction.ts b/elements/lisk-transactions/src/15_proof_of_misbehavior_transaction.ts index fa029ac4cb7..83e04037a65 100644 --- a/elements/lisk-transactions/src/15_proof_of_misbehavior_transaction.ts +++ b/elements/lisk-transactions/src/15_proof_of_misbehavior_transaction.ts @@ -130,7 +130,6 @@ const proofOfMisbehaviorAssetFormatSchema = { export interface ProofOfMisbehaviorAsset { readonly header1: BlockHeaderJSON; readonly header2: BlockHeaderJSON; - // tslint:disable-next-line readonly-keyword reward: bigint; } @@ -228,9 +227,7 @@ export class ProofOfMisbehaviorTransaction extends BaseTransaction { 3. Branch is not the one with largest maxHeighPrevoted */ - // tslint:disable-next-line no-let let b1 = this.asset.header1; - // tslint:disable-next-line no-let let b2 = this.asset.header2; // Order the two block headers such that b1 must be forged first @@ -277,7 +274,6 @@ export class ProofOfMisbehaviorTransaction extends BaseTransaction { |header2.height - h| < 260,000. */ - // tslint:disable-next-line no-magic-numbers if ( Math.abs(this.asset.header1.height - currentHeight) >= MAX_PUNISHABLE_BLOCK_HEIGHT_DIFFERENCE @@ -292,7 +288,6 @@ export class ProofOfMisbehaviorTransaction extends BaseTransaction { ); } - // tslint:disable-next-line no-magic-numbers if ( Math.abs(this.asset.header2.height - currentHeight) >= MAX_PUNISHABLE_BLOCK_HEIGHT_DIFFERENCE @@ -461,7 +456,6 @@ export class ProofOfMisbehaviorTransaction extends BaseTransaction { height => height === currentHeight, ); delegateAccount.delegate.pomHeights.splice(pomIndex, 1); - // tslint:disable-next-line no-magic-numbers if (delegateAccount.delegate.pomHeights.length < 5) { delegateAccount.delegate.isBanned = false; } diff --git a/elements/lisk-transactions/src/8_transfer_transaction.ts b/elements/lisk-transactions/src/8_transfer_transaction.ts index 18c18cdd273..2c535a1b7f3 100644 --- a/elements/lisk-transactions/src/8_transfer_transaction.ts +++ b/elements/lisk-transactions/src/8_transfer_transaction.ts @@ -81,7 +81,6 @@ export class TransferTransaction extends BaseTransaction { ), }; } else { - // tslint:disable-next-line no-object-literal-type-assertion this.asset = { amount: BigInt('0'), recipientId: '', diff --git a/elements/lisk-transactions/src/constants.ts b/elements/lisk-transactions/src/constants.ts index 9f6b7e05bdf..53e33898622 100644 --- a/elements/lisk-transactions/src/constants.ts +++ b/elements/lisk-transactions/src/constants.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -/* tslint:disable:no-magic-numbers */ export const FIXED_POINT = 10 ** 8; export const MIN_FEE_PER_BYTE = 1000; diff --git a/elements/lisk-transactions/src/errors.ts b/elements/lisk-transactions/src/errors.ts index f5809218699..741d4fc45cf 100644 --- a/elements/lisk-transactions/src/errors.ts +++ b/elements/lisk-transactions/src/errors.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. * */ -// tslint:disable max-classes-per-file export class TransactionError extends Error { public message: string; public id: string; @@ -57,7 +56,6 @@ interface ErrorObject { export const convertToTransactionError = ( id: string, - // tslint:disable-next-line no-null-undefined-union errors: ReadonlyArray | null | undefined, ): ReadonlyArray => { if (!errors) { @@ -77,7 +75,6 @@ export const convertToTransactionError = ( export const convertToAssetError = ( id: string, - // tslint:disable-next-line no-null-undefined-union errors: ReadonlyArray | null | undefined, ): ReadonlyArray => { if (!errors) { diff --git a/elements/lisk-transactions/src/sign_multi_signature_transaction.ts b/elements/lisk-transactions/src/sign_multi_signature_transaction.ts index 71dc05585e6..88a062b64e2 100644 --- a/elements/lisk-transactions/src/sign_multi_signature_transaction.ts +++ b/elements/lisk-transactions/src/sign_multi_signature_transaction.ts @@ -36,14 +36,12 @@ const sanitizeSignaturesArray = ( tx: BaseTransaction, keys: MultisigKeys, ): void => { - // tslint:disable-next-line: no-let let numberOfSignatures = keys.mandatoryKeys.length + keys.optionalKeys.length; // Add one extra for multisig account registration if (tx.type === MultisignatureTransaction.TYPE) { numberOfSignatures += 1; } - // tslint:disable-next-line: no-let for (let i = 0; i < numberOfSignatures; i += 1) { if (tx.signatures[i] === undefined) { // eslint-disable-next-line no-param-reassign @@ -115,7 +113,6 @@ export const signMultiSignatureTransaction = (options: { // If it's a mandatory Public Key find where to add the signature if (mandatoryKeyIndex !== -1) { - // tslint:disable-next-line: no-let let signatureOffset = 0; if (tx.type === MultisignatureTransaction.TYPE) { @@ -126,7 +123,6 @@ export const signMultiSignatureTransaction = (options: { } if (optionalKeyIndex !== -1) { - // tslint:disable-next-line: no-let let signatureOffset = 0; if (tx.type === MultisignatureTransaction.TYPE) { diff --git a/elements/lisk-transactions/src/transaction_types.ts b/elements/lisk-transactions/src/transaction_types.ts index 6400bcab06c..4cc730616a3 100644 --- a/elements/lisk-transactions/src/transaction_types.ts +++ b/elements/lisk-transactions/src/transaction_types.ts @@ -16,7 +16,6 @@ import { TransactionError } from './errors'; export interface AccountVote { readonly delegateAddress: string; - // tslint:disable-next-line readonly-keyword amount: bigint; } export interface AccountUnlocking { @@ -24,7 +23,6 @@ export interface AccountUnlocking { readonly amount: bigint; readonly unvoteHeight: number; } -// tslint:disable readonly-keyword export interface Account { readonly address: string; balance: bigint; @@ -53,7 +51,6 @@ export interface Account { totalVotesReceived: bigint; readonly toJSON: () => object; } -// tslint:enable readonly-keyword export interface Delegate { readonly username: string; } diff --git a/elements/lisk-transactions/src/utils/build_key_passphrase_dict.ts b/elements/lisk-transactions/src/utils/build_key_passphrase_dict.ts index ab6f0867cbd..06c0a8cb2cd 100644 --- a/elements/lisk-transactions/src/utils/build_key_passphrase_dict.ts +++ b/elements/lisk-transactions/src/utils/build_key_passphrase_dict.ts @@ -16,7 +16,6 @@ import { getPrivateAndPublicKeyFromPassphrase } from '@liskhq/lisk-cryptography'; interface PublicKeyPassphraseDict { - // tslint:disable-next-line: readonly-keyword [key: string]: { readonly privateKey: string; readonly publicKey: string; diff --git a/elements/lisk-transactions/src/utils/verify.ts b/elements/lisk-transactions/src/utils/verify.ts index 926a6960a9a..a70396188c2 100644 --- a/elements/lisk-transactions/src/utils/verify.ts +++ b/elements/lisk-transactions/src/utils/verify.ts @@ -99,7 +99,6 @@ export const validateKeysSignatures = ( ): TransactionError[] => { const errors = []; - // tslint:disable-next-line: prefer-for-of no-let for (let i = 0; i < keys.length; i += 1) { if (signatures[i].length === 0) { errors.push( @@ -164,7 +163,6 @@ export const verifyMultiSignatureTransaction = ( errors.push(...mandatoryKeysError); // Iterate through non empty optional keys for signature validity - // tslint:disable-next-line: prefer-for-of no-let for (let k = 0; k < numOptionalKeys; k += 1) { // Get corresponding optional key signature starting from offset(end of mandatory keys) const signature = signatures[numMandatoryKeys + k]; diff --git a/elements/lisk-transactions/test/utils/state_store_mock.ts b/elements/lisk-transactions/test/utils/state_store_mock.ts index bedc5c7e7a3..6e07c846d40 100644 --- a/elements/lisk-transactions/test/utils/state_store_mock.ts +++ b/elements/lisk-transactions/test/utils/state_store_mock.ts @@ -29,9 +29,7 @@ export const defaultAccount = { producedBlocks: 0, fees: BigInt('0'), rewards: BigInt('0'), - // tslint:disable-next-line:no-null-keyword asset: {}, - // tslint:disable-next-line:no-null-keyword toJSON: (): object => ({}), keys: { mandatoryKeys: [], diff --git a/elements/lisk-validator/package.json b/elements/lisk-validator/package.json index 7fda2177465..5645e9fa88b 100644 --- a/elements/lisk-validator/package.json +++ b/elements/lisk-validator/package.json @@ -25,7 +25,7 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", diff --git a/framework/package.json b/framework/package.json index cf80ce81f20..079b5836384 100644 --- a/framework/package.json +++ b/framework/package.json @@ -27,7 +27,7 @@ "scripts": { "start": "node src/index.js", "start:test:app": "node test/test_app", - "lint": "eslint . --ext .js,.ts", + "lint": "eslint --ext .js,.ts .", "lint:fix": "eslint --fix --ext .js,.ts .", "format": "prettier --write '**/*'", "test": "npm run jest:unit", @@ -123,8 +123,8 @@ "sinon-chai": "3.5.0", "stampit": "4.3.1", "supertest": "3.3.0", - "ts-jest": "24.2.0", - "ts-node": "8.5.2", + "ts-jest": "25.2.1", + "ts-node": "8.6.2", "typescript": "3.8.3" } } diff --git a/package.json b/package.json index e2024210208..859fbcb7a49 100644 --- a/package.json +++ b/package.json @@ -41,9 +41,8 @@ "clean:node_modules": "lerna clean --yes", "format": "npm run format:root && lerna run format", "format:root": "prettier --write types/**/*.ts", - "lint": "npm run lint:root && lerna run lint", - "lint:fix": "npm run lint:root -- --fix && lerna run lint:fix", - "lint:root": "tslint -p tsconfig.json types/**/*.ts", + "lint": "lerna run lint", + "lint:fix": "lerna run lint:fix", "test": "lerna run test", "build": "lerna run build", "init": "./scripts/init.sh" @@ -55,16 +54,17 @@ }, "devDependencies": { "@types/node": "12.12.11", + "@typescript-eslint/eslint-plugin": "2.28.0", + "@typescript-eslint/parser": "2.28.0", "ansi-regex": "5.0.0", "eslint": "6.8.0", - "eslint-config-airbnb-base": "14.0.0", "eslint-config-lisk-base": "1.2.2", - "eslint-plugin-chai-expect": "2.1.0", + "eslint-config-prettier": "6.10.0", "eslint-plugin-import": "2.20.1", "eslint-plugin-jest": "23.8.2", + "eslint-config-airbnb-base": "14.0.0", + "eslint-plugin-chai-expect": "2.1.0", "eslint-plugin-mocha": "6.3.0", - "@typescript-eslint/eslint-plugin": "2.28.0", - "@typescript-eslint/parser": "2.28.0", "husky": "4.2.3", "istanbul-lib-coverage": "3.0.0", "istanbul-lib-report": "3.0.0", @@ -72,9 +72,6 @@ "lerna": "3.20.2", "lint-staged": "10.0.8", "prettier": "1.19.1", - "tslint": "6.0.0", - "tslint-config-prettier": "1.18.0", - "tslint-immutable": "6.0.1", "typescript": "3.8.3", "yarn": "1.22.0" } diff --git a/scripts/init.sh b/scripts/init.sh index 8be72e29fcf..0687bd77657 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -31,23 +31,38 @@ sed -i '' -e "s/{PORT}/${port}/g" "$packageDir/package.json" sed -i '' -e "s/{BROWSER_PACKAGE}/${browserPackageName}/g" "$packageDir/package.json" cp "./templates/README.md.tmpl" "$packageDir/README.md" -templates=( +copy_templates=( + ".eslintrc.js" + ".eslintignore" +) + +link_templates=( "scripts" ".npmignore" ".npmrc" ".prettierignore" ".prettierrc.json" - "tslint.json" "jest.config.js" "tsconfig.json" ) -test_templates=( - "tslint.json" +copy_test_templates=( + ".eslintrc.js" +) + +link_test_templates=( "tsconfig.json" ) -for i in "${templates[@]}" +for i in "${copy_templates[@]}" +do + echo ${i} + if [ ! -e "$packageDir/${i}" ]; then + cp "./templates/$i.tmpl" "$packageDir/$i" + fi +done + +for i in "${link_templates[@]}" do echo ${i} if [ ! -e "$packageDir/${i}" ]; then @@ -55,10 +70,18 @@ do fi done -for i in "${test_templates[@]}" +for i in "${copy_test_templates[@]}" +do + echo ${i} + if [ ! -e "$packageDir/test/${i}" ]; then + cp "./templates/test/$i.tmpl" "$packageDir/test/$i" + fi +done + +for i in "${link_test_templates[@]}" do echo ${i} if [ ! -e "$packageDir/test/${i}" ]; then ln -vs "../../../templates/test/$i.tmpl" "$packageDir/test/$i" fi -done \ No newline at end of file +done diff --git a/sdk/.eslintignore b/sdk/.eslintignore index 542a1791d0e..82ae73d1e74 100644 --- a/sdk/.eslintignore +++ b/sdk/.eslintignore @@ -6,3 +6,4 @@ release ssl stacktrace* tmp +index.d.ts \ No newline at end of file diff --git a/sdk/.eslintrc.json b/sdk/.eslintrc.json index 6efa26da1e2..ca8f8b62d74 100644 --- a/sdk/.eslintrc.json +++ b/sdk/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../.eslintrc.json"], + "extends": ["../.eslintrc.js"], "rules": { "camelcase": "off", "comma-dangle": [ diff --git a/sdk/src/index.d.ts b/sdk/src/index.d.ts index 5b0447833d9..76ff205b114 100644 --- a/sdk/src/index.d.ts +++ b/sdk/src/index.d.ts @@ -12,7 +12,6 @@ * Removal or modification of this copyright notice is prohibited. */ -/* tslint:disable */ import * as cryptography from '@liskhq/lisk-cryptography'; import * as transactions from '@liskhq/lisk-transactions'; import * as validator from '@liskhq/lisk-validator'; diff --git a/templates/.eslintignore.tmpl b/templates/.eslintignore.tmpl new file mode 100644 index 00000000000..18f63c615af --- /dev/null +++ b/templates/.eslintignore.tmpl @@ -0,0 +1,2 @@ +dist-node +jest.config.js diff --git a/templates/.eslintrc.js.tmpl b/templates/.eslintrc.js.tmpl new file mode 100644 index 00000000000..8b7fd410b8d --- /dev/null +++ b/templates/.eslintrc.js.tmpl @@ -0,0 +1,7 @@ +module.exports = { + extends: '../../.eslintrc.js', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, +}; diff --git a/templates/package.json.tmpl b/templates/package.json.tmpl index 89b9b6c16cb..b37224d793a 100644 --- a/templates/package.json.tmpl +++ b/templates/package.json.tmpl @@ -24,8 +24,8 @@ "scripts": { "clean": "./scripts/clean.sh", "format": "prettier --write '**/*'", - "lint": "tslint --format verbose --project .", - "lint:fix": "npm run lint -- --fix", + "lint": "eslint --ext .js,.ts .", + "lint:fix": "eslint --fix --ext .js,.ts .", "test": "jest", "test:watch": "npm test -- --watch", "prebuild": "rm -r dist-node/* || mkdir dist-node || true", @@ -34,22 +34,26 @@ "prepublishOnly": "npm run lint && npm test && npm run build && npm run build:check" }, "dependencies": { - "@types/node": "12.12.11" }, "devDependencies": { - "@types/jest": "24.0.23", + "@types/node": "12.12.11" + "@types/jest": "25.1.3", "@types/jest-when": "2.7.0", - "jest": "24.5.0", - "jest-when": "2.6.0", - "jest-extended": "0.11.1", + "@typescript-eslint/eslint-plugin": "2.28.0", + "@typescript-eslint/parser": "2.28.0", + "eslint": "6.8.0", + "eslint-config-lisk-base": "1.2.2", + "eslint-config-prettier": "6.10.0", + "eslint-plugin-import": "2.20.1", + "eslint-plugin-jest": "23.8.2", + "jest": "25.1.0", + "jest-extended": "0.11.5", + "jest-when": "2.7.0", "prettier": "1.19.1", - "source-map-support": "0.5.10", - "ts-node": "8.5.2", - "tsconfig-paths": "3.8.0", - "ts-jest": "24.2.0", - "tslint": "5.20.1", - "tslint-config-prettier": "1.18.0", - "tslint-immutable": "6.0.1", - "typescript": "3.7.2" + "source-map-support": "0.5.16", + "ts-jest": "25.2.1", + "ts-node": "8.6.2", + "tsconfig-paths": "3.9.0", + "typescript": "3.8.3" } } diff --git a/templates/test/.eslintrc.js.tmpl b/templates/test/.eslintrc.js.tmpl new file mode 100644 index 00000000000..a98dfb6d823 --- /dev/null +++ b/templates/test/.eslintrc.js.tmpl @@ -0,0 +1,7 @@ +module.exports = { + extends: '../../../.eslintrc.test.js', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, +}; diff --git a/templates/test/tslint.json.tmpl b/templates/test/tslint.json.tmpl deleted file mode 100644 index cf9eceecc02..00000000000 --- a/templates/test/tslint.json.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["../../../tslint.test.json"] -} diff --git a/templates/tslint.json.tmpl b/templates/tslint.json.tmpl deleted file mode 100644 index f43f8daec44..00000000000 --- a/templates/tslint.json.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tslint.json" -} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 5a087a59594..00000000000 --- a/tslint.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": ["tslint:all", "tslint-immutable/all", "tslint-config-prettier"], - "rules": { - "completed-docs": false, - "file-name-casing": false, - "interface-name": [true, "never-prefix"], - // Better to have functionally similar items be close together. - "member-ordering": false, - "no-class": false, - "no-expression-statement": false, - "no-if-statement": false, - "no-method-signature": false, - "no-object-mutation": false, - "no-this": false, - "no-try": false, - "no-throw": false, - "no-unsafe-any": false, - "no-loop-statement": false, - "no-array-mutation": false, - "object-literal-sort-keys": false, - "prefer-method-signature": false, - "readonly-array": false, - "readonly-keyword": [true, "ignore-class"], - "strict-boolean-expressions": false, - "strict-type-predicates": false, - // This is temporally for BigInt comparison - "strict-comparisons": false, - // We need private class properties to start with an underscore. - "variable-name": [true, "allow-leading-underscore"] - } -} diff --git a/tslint.test.json b/tslint.test.json deleted file mode 100644 index ee491a33df1..00000000000 --- a/tslint.test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "rules": { - "arrow-return-shorthand": "off", - "no-expression-statement": "off" - } -} diff --git a/yarn.lock b/yarn.lock index 7664389df5a..008cb7be0cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3111,11 +3111,6 @@ buffer@^5.0.2, buffer@^5.2.1: base64-js "^1.0.2" ieee754 "^1.1.4" -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -3337,7 +3332,7 @@ chai@4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3673,7 +3668,7 @@ commander@2.15.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== -commander@^2.12.1, commander@^2.7.1, commander@~2.20.3: +commander@^2.7.1, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -12471,22 +12466,6 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -ts-jest@24.2.0: - version "24.2.0" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.2.0.tgz#7abca28c2b4b0a1fdd715cd667d65d047ea4e768" - integrity sha512-Yc+HLyldlIC9iIK8xEN7tV960Or56N49MDP7hubCZUeI7EbIOTsas6rXCMB4kQjLACJ7eDOF4xWEO5qumpKsag== - dependencies: - bs-logger "0.x" - buffer-from "1.x" - fast-json-stable-stringify "2.x" - json5 "2.x" - lodash.memoize "4.x" - make-error "1.x" - mkdirp "0.x" - resolve "1.x" - semver "^5.5" - yargs-parser "10.x" - ts-jest@25.2.1: version "25.2.1" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.2.1.tgz#49bf05da26a8b7fbfbc36b4ae2fcdc2fef35c85d" @@ -12503,17 +12482,6 @@ ts-jest@25.2.1: semver "^5.5" yargs-parser "^16.1.0" -ts-node@8.5.2: - version "8.5.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.5.2.tgz#434f6c893bafe501a30b32ac94ee36809ba2adce" - integrity sha512-W1DK/a6BGoV/D4x/SXXm6TSQx6q3blECUzd5TN+j56YEMX3yPVMpHsICLedUw3DvGF3aTQ8hfdR9AKMaHjIi+A== - dependencies: - arg "^4.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.6" - yn "^3.0.0" - ts-node@8.6.2: version "8.6.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.6.2.tgz#7419a01391a818fbafa6f826a33c1a13e9464e35" @@ -12535,7 +12503,7 @@ tsconfig-paths@3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@1.11.1, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@1.11.1, tslib@^1.8.1, tslib@^1.9.0: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== @@ -12550,56 +12518,18 @@ tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tslint-config-prettier@1.18.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" - integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== - -tslint-immutable@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/tslint-immutable/-/tslint-immutable-6.0.1.tgz#6ae3f85cc3d8fb9d465d2f9a90ed6d6c50ccd3e6" - integrity sha512-3GQ6HffN64gLmT/N1YzyVMqyf6uBjMvhNaevK8B0K01/QC0OU5AQZrH4TjMHo1IdG3JpqsZvuRy9IW1LA3zjwA== - dependencies: - tsutils "^2.28.0 || ^3.0.0" - -tslint@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.0.0.tgz#1c0148beac4779924216302f192cdaa153618310" - integrity sha512-9nLya8GBtlFmmFMW7oXXwoXS1NkrccqTqAtwXzdPV9e2mqSEvCki6iHL/Fbzi5oqbugshzgGPk7KBb2qNP1DSA== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^4.0.1" - glob "^7.1.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - mkdirp "^0.5.1" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.10.0" - tsutils "^2.29.0" - tsscmp@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA== -"tsutils@^2.28.0 || ^3.0.0", tsutils@^3.17.1: +tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== dependencies: tslib "^1.8.1" -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" @@ -13319,13 +13249,6 @@ yamljs@0.3.0: argparse "^1.0.7" glob "^7.0.5" -yargs-parser@10.x, yargs-parser@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - yargs-parser@13.1.1, yargs-parser@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" @@ -13334,6 +13257,13 @@ yargs-parser@13.1.1, yargs-parser@^13.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" + yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" @@ -13443,7 +13373,7 @@ yeast@0.1.2: resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= -yn@3.1.1, yn@^3.0.0: +yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==