diff --git a/.github/ISSUE_TEMPLATE/eslint-plugin-tslint.md b/.github/ISSUE_TEMPLATE/eslint-plugin-tslint.md new file mode 100644 index 000000000000..1dea769a086d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/eslint-plugin-tslint.md @@ -0,0 +1,26 @@ +--- +name: eslint-plugin-tslint +about: Report an issue with the eslint-plugin-tslint package +--- + +**What version of Node.js and npm are you using?** + +- Node: +- npm: + +**What version of the following packages are you using?** + +- eslint-plugin-tslint: +- @typescript-eslint/parser: +- TypeScript: +- ESLint: + +**What code were you trying to parse?** + +```ts +// Please put code here +``` + +**What did you expect to happen?** + +**What actually happened?** diff --git a/README.md b/README.md index 60f54b277c54..e7168f94ad0b 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,6 @@ This repo contains several packages which allow ESLint users to lint their TypeS - `eslint-plugin-tslint` - An ESLint-specific plugin which runs an instance of TSLint within your ESLint setup to allow for users to more easily migrate from TSLint to ESLint. - - PENDING MIGRATION TO MONOREPO - ## Supported TypeScript Version We will always endeavor to support the latest stable version of TypeScript. diff --git a/package.json b/package.json index cfca03f0e419..b7a306f556da 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "postinstall": "lerna bootstrap && lerna link", - "test": "lerna run test", + "postinstall": "lerna bootstrap && yarn build && lerna link", + "test": "lerna run test --parallel", "build": "lerna run build", - "clean": "lerna run clean", + "clean": "lerna clean && lerna run clean", "precommit": "yarn test && lint-staged", "cz": "git-cz", "commitmsg": "commitlint -E GIT_PARAMS", diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md new file mode 100644 index 000000000000..762c01b51ef9 --- /dev/null +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -0,0 +1,27 @@ +# [3.1.0](https://github.com/JamesHenry/eslint-plugin-tslint/compare/v3.0.0...v3.1.0) (2018-10-19) + +### Bug Fixes + +- Tiny lint note elimination ([a731838](https://github.com/JamesHenry/eslint-plugin-tslint/commit/a731838)) + +### Features + +- Support for tslint property ([18a4afb](https://github.com/JamesHenry/eslint-plugin-tslint/commit/18a4afb)), closes [#40](https://github.com/JamesHenry/eslint-plugin-tslint/issues/40) + +# [3.0.0](https://github.com/JamesHenry/eslint-plugin-tslint/compare/v2.1.0...v3.0.0) (2018-09-09) + +### Bug Fixes + +- Fixed bug when file not defined in tsconfig ([20b498b](https://github.com/JamesHenry/eslint-plugin-tslint/commit/20b498b)) +- Pass sourceText parameter to service getSource ([dd4c2f8](https://github.com/JamesHenry/eslint-plugin-tslint/commit/dd4c2f8)) +- Update program when sourceFile was updated ([0fe933c](https://github.com/JamesHenry/eslint-plugin-tslint/commit/0fe933c)) +- Updated typescript-service dependency ([2f4f434](https://github.com/JamesHenry/eslint-plugin-tslint/commit/2f4f434)) + +### Features + +- **core:** Added support rules requires type information ([6bc1deb](https://github.com/JamesHenry/eslint-plugin-tslint/commit/6bc1deb)), closes [#32](https://github.com/JamesHenry/eslint-plugin-tslint/issues/32) [#34](https://github.com/JamesHenry/eslint-plugin-tslint/issues/34) +- Post merge adapdation from tslint2 repository ([477c656](https://github.com/JamesHenry/eslint-plugin-tslint/commit/477c656)), closes [#32](https://github.com/JamesHenry/eslint-plugin-tslint/issues/32) [#34](https://github.com/JamesHenry/eslint-plugin-tslint/issues/34) + +### BREAKING CHANGES + +- New dependency diff --git a/packages/eslint-plugin-tslint/LICENSE b/packages/eslint-plugin-tslint/LICENSE new file mode 100644 index 000000000000..8deb7127de78 --- /dev/null +++ b/packages/eslint-plugin-tslint/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 James Henry + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/eslint-plugin-tslint/README.md b/packages/eslint-plugin-tslint/README.md new file mode 100644 index 000000000000..388238b6a5fc --- /dev/null +++ b/packages/eslint-plugin-tslint/README.md @@ -0,0 +1,49 @@ +# ESLint Plugin TSLint + +[![Travis](https://img.shields.io/travis/JamesHenry/eslint-plugin-tslint.svg?style=flat-square)](https://travis-ci.org/JamesHenry/eslint-plugin-tslint) +[![GitHub license](https://img.shields.io/npm/l/eslint-plugin-tslint.svg?style=flat-square)](https://github.com/JamesHenry/eslint-plugin-tslint/blob/master/LICENSE) +[![NPM Version](https://img.shields.io/npm/v/eslint-plugin-tslint.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-tslint) +[![NPM Downloads](https://img.shields.io/npm/dt/eslint-plugin-tslint.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-tslint) +[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) +[![greenkeeper.io](https://badges.greenkeeper.io/JamesHenry/mongoose-schema-to-typescript-interface.svg?style=flat-square)](https://greenkeeper.io) + +ESLint plugin wraps a TSLint configuration and lints the whole source using TSLint. + +## INSTALL + +``` +npm i -D eslint-plugin-tslint +``` + +## USAGE + +Configure in your eslint config file: + +``` +"plugins": [ + "tslint" +], +"rules": { + "tslint/config": ["warn", { + lintFile: '/* path to tslint.json of your project */', + rules: { /* tslint rules (will be used if `lintFile` is not specified) */ }, + rulesDirectory: [ /* array of paths to directories with rules, e.g. 'node_modules/tslint/lib/rules' (will be used if `lintFile` is not specified) */ ] + }], +} +``` + +## RULES + +Plugin contains only single rule `tslint/config`. + +## EXAMPLES + +- [unlight/node-package-starter/.eslintrc.js](https://github.com/unlight/node-package-starter/blob/master/.eslintrc.js) + +### TSLint Plugins + +- https://github.com/Glavin001/tslint-clean-code +- https://github.com/Microsoft/tslint-microsoft-contrib +- https://github.com/SonarSource/SonarTS +- https://github.com/ajafff/tslint-consistent-codestyle diff --git a/packages/eslint-plugin-tslint/jest.config.js b/packages/eslint-plugin-tslint/jest.config.js new file mode 100644 index 000000000000..828d3217787d --- /dev/null +++ b/packages/eslint-plugin-tslint/jest.config.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + testEnvironment: 'node', + transform: { + '^.+\\.tsx?$': 'ts-jest' + }, + testRegex: './tests/.+\\.spec\\.ts$', + collectCoverage: false, + collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + coverageReporters: ['text-summary', 'lcov'] +}; diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json new file mode 100644 index 000000000000..a97a3995861d --- /dev/null +++ b/packages/eslint-plugin-tslint/package.json @@ -0,0 +1,40 @@ +{ + "name": "eslint-plugin-tslint", + "version": "3.1.0", + "main": "dist/index.js", + "typings": "src/index.ts", + "author": "James Henry ", + "contributors": [ + "Roman Vasilev (https://github.com/unlight)" + ], + "description": "TSLint wrapper plugin for ESLint", + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin", + "tslint" + ], + "repository": "typescript-eslint/typescript-eslint", + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "license": "MIT", + "scripts": { + "test": "jest --coverage", + "prebuild": "npm run clean", + "build": "tsc", + "clean": "rm -rf dist/" + }, + "dependencies": { + "lodash.memoize": "^4.1.2" + }, + "peerDependencies": { + "tslint": "^5.0.0" + }, + "devDependencies": { + "@types/eslint": "^4.16.3", + "@types/lodash.memoize": "^4.1.4", + "@typescript-eslint/parser": "21.0.2", + "tslint": "^5.11.0" + } +} diff --git a/packages/eslint-plugin-tslint/src/custom-linter.ts b/packages/eslint-plugin-tslint/src/custom-linter.ts new file mode 100644 index 000000000000..6775dc36f8d7 --- /dev/null +++ b/packages/eslint-plugin-tslint/src/custom-linter.ts @@ -0,0 +1,19 @@ +import { ILinterOptions, Linter, LintResult } from 'tslint'; +import { Program } from 'typescript'; + +const TSLintLinter = Linter as any; + +export class CustomLinter extends TSLintLinter { + constructor(options: ILinterOptions, private program: Program) { + super(options, program); + } + + getResult(): LintResult { + return super.getResult(); + } + + getSourceFile(fileName: string) { + const result = this.program.getSourceFile(fileName); + return result; + } +} diff --git a/packages/eslint-plugin-tslint/src/index.ts b/packages/eslint-plugin-tslint/src/index.ts new file mode 100644 index 000000000000..78e946af6294 --- /dev/null +++ b/packages/eslint-plugin-tslint/src/index.ts @@ -0,0 +1,168 @@ +import { Rule } from 'eslint'; +import memoize from 'lodash.memoize'; +import { Configuration, RuleSeverity } from 'tslint'; +import { Program } from 'typescript'; +import { CustomLinter } from './custom-linter'; + +//------------------------------------------------------------------------------ +// Plugin Definition +//------------------------------------------------------------------------------ + +/** + * @todo share types between packages + */ +interface ParserServices { + program: Program | undefined; + esTreeNodeToTSNodeMap: WeakMap | undefined; + tsNodeToESTreeNodeMap: WeakMap | undefined; +} + +type RawRuleConfig = + | null + | undefined + | boolean + | any[] + | { + severity?: RuleSeverity | 'warn' | 'none' | 'default'; + options?: any; + }; + +interface RawRulesConfig { + [key: string]: RawRuleConfig; +} + +/** + * Construct a configFile for TSLint + */ +const tslintConfig = memoize( + ( + lintFile: string, + tslintRules: RawRulesConfig, + tslintRulesDirectory: string[] + ) => { + if (lintFile != null) { + return Configuration.loadConfigurationFromPath(lintFile); + } + return Configuration.parseConfigFile({ + rules: tslintRules || {}, + rulesDirectory: tslintRulesDirectory || [] + }); + }, + (lintFile: string | undefined, tslintRules = {}, tslintRulesDirectory = []) => + `${lintFile}_${Object.keys(tslintRules).join(',')}_${ + tslintRulesDirectory.length + }` +); + +export const rules = { + /** + * Expose a single rule called "config", which will be accessed in the user's eslint config files + * via "tslint/config" + */ + config: { + meta: { + docs: { + description: + 'Wraps a TSLint configuration and lints the whole source using TSLint', + category: 'TSLint' + }, + schema: [ + { + type: 'object', + properties: { + rules: { + type: 'object', + /** + * No fixed schema properties for rules, as this would be a permanently moving target + */ + additionalProperties: true + }, + rulesDirectory: { + type: 'array', + items: { + type: 'string' + } + }, + lintFile: { + type: 'string' + } + }, + additionalProperties: false + } + ] + }, + create: function(context: Rule.RuleContext) { + const fileName = context.getFilename(); + const sourceCode = context.getSourceCode().text; + const parserServices: ParserServices | undefined = context.parserServices; + + /** + * The user needs to have configured "project" in their parserOptions + * for @typescript-eslint/parser + */ + if (!parserServices || !parserServices.program) { + throw new Error( + `You must provide a value for the "parserOptions.project" property for @typescript-eslint/parser` + ); + } + + /** + * The TSLint rules configuration passed in by the user + */ + const { + rules: tslintRules, + rulesDirectory: tslintRulesDirectory, + lintFile + } = context.options[0]; + + const program: Program = parserServices.program; + + /** + * Create an instance of TSLint + * Lint the source code using the configured TSLint instance, and the rules which have been + * passed via the ESLint rule options for this rule (using "tslint/config") + */ + const tslintOptions = { + formatter: 'json', + fix: false + }; + const tslint = new CustomLinter(tslintOptions, program); + const configuration = tslintConfig( + lintFile, + tslintRules, + tslintRulesDirectory + ); + tslint.lint(fileName, sourceCode, configuration); + + const result = tslint.getResult(); + + /** + * Format the TSLint results for ESLint + */ + if (result.failures && result.failures.length) { + result.failures.forEach(failure => { + const start = failure.getStartPosition().getLineAndCharacter(); + const end = failure.getEndPosition().getLineAndCharacter(); + context.report({ + message: `${failure.getFailure()} (tslint:${failure.getRuleName()})`, + loc: { + start: { + line: start.line + 1, + column: start.character + }, + end: { + line: end.line + 1, + column: end.character + } + } + }); + }); + } + + /** + * Return an empty object for the ESLint rule + */ + return {}; + } + } +}; diff --git a/packages/eslint-plugin-tslint/tests/index.spec.ts b/packages/eslint-plugin-tslint/tests/index.spec.ts new file mode 100644 index 000000000000..1b78c3943f85 --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/index.spec.ts @@ -0,0 +1,140 @@ +import { rules } from '../src/index'; +import { RuleTester } from 'eslint'; +import { readFileSync } from 'fs'; + +const ruleTester = new RuleTester(); + +const parserOptions: any = { + ecmaVersion: 6, + sourceType: 'module', + ecmaFeatures: {}, + /** + * Project is needed to generate the parserServices + * within @typescript-eslint/parser + */ + project: './tests/tsconfig.json' +}; + +/** + * Inline rules should be supported + */ +const tslintRulesConfig = { + rules: { + semicolon: [true, 'always'] + } +}; + +/** + * Custom rules directories should be supported + */ +const tslintRulesDirectoryConfig = { + rulesDirectory: ['./tests/test-tslint-rules-directory'], + rules: { + 'always-fail': { + severity: 'error' + } + } +}; + +ruleTester.run('tslint/config', rules.config, { + valid: [ + { + code: 'var foo = true;', + parser: '@typescript-eslint/parser', + parserOptions, + options: [tslintRulesConfig] + }, + { + filename: './tests/test-project/file-spec.ts', + code: readFileSync('./tests/test-project/file-spec.ts', 'utf8').replace( + /\n/g, + ' ' + ), + parser: '@typescript-eslint/parser', + parserOptions: { + ...parserOptions, + project: `${__dirname}/test-project/tsconfig.json` + }, + options: [ + { + ...tslintRulesConfig + } + ] + }, + { + code: 'throw "should be ok because rule is not loaded";', + parser: '@typescript-eslint/parser', + parserOptions, + options: [tslintRulesConfig] + } + ], + + invalid: [ + { + options: [{ lintFile: './tests/test-project/tslint.json' }], + parser: '@typescript-eslint/parser', + parserOptions, + code: 'throw "err" // no-string-throw', + errors: [ + { + message: + 'Throwing plain strings (not instances of Error) gives no stack traces (tslint:no-string-throw)' + } + ] + }, + { + code: 'var foo = true // semicolon', + parser: '@typescript-eslint/parser', + parserOptions, + options: [tslintRulesConfig], + output: 'var foo = true // semicolon', + errors: [ + { + message: 'Missing semicolon (tslint:semicolon)', + line: 1, + column: 15 + } + ] + }, + { + code: 'var foo = true // fail', + parser: '@typescript-eslint/parser', + parserOptions, + options: [tslintRulesDirectoryConfig], + output: 'var foo = true // fail', + errors: [ + { + message: 'failure (tslint:always-fail)', + line: 1, + column: 1 + } + ] + }, + { + filename: './tests/test-project/source.ts', + code: readFileSync('./tests/test-project/source.ts', 'utf8').replace( + /\n/g, + ' ' + ), + parser: '@typescript-eslint/parser', + parserOptions: { + ...parserOptions, + project: `${__dirname}/test-project/tsconfig.json` + }, + options: [ + { + rulesDirectory: [ + `${__dirname}/../../../node_modules/tslint/lib/rules` + ], + rules: { 'restrict-plus-operands': true } + } + ], + errors: [ + { + message: + "Operands of '+' operation must either be both strings or both numbers, consider using template literals (tslint:restrict-plus-operands)" + } + ] + } + ] +}); diff --git a/packages/eslint-plugin-tslint/tests/test-project/file-spec.ts b/packages/eslint-plugin-tslint/tests/test-project/file-spec.ts new file mode 100644 index 000000000000..0b4d57c7ee74 --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-project/file-spec.ts @@ -0,0 +1,2 @@ +import { x } from './file'; +console.assert(x); diff --git a/packages/eslint-plugin-tslint/tests/test-project/file.ts b/packages/eslint-plugin-tslint/tests/test-project/file.ts new file mode 100644 index 000000000000..d85368d8a303 --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-project/file.ts @@ -0,0 +1,3 @@ +import * as number from './number'; +export const x = 1; +console.log(number); diff --git a/packages/eslint-plugin-tslint/tests/test-project/source.ts b/packages/eslint-plugin-tslint/tests/test-project/source.ts new file mode 100644 index 000000000000..187dd947b0ff --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-project/source.ts @@ -0,0 +1,2 @@ +const a: string = 1; +const sum = 1 + '2'; diff --git a/packages/eslint-plugin-tslint/tests/test-project/tsconfig-files.json b/packages/eslint-plugin-tslint/tests/test-project/tsconfig-files.json new file mode 100644 index 000000000000..1d1ee04cc92b --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-project/tsconfig-files.json @@ -0,0 +1,4 @@ +{ + "lib": ["dom"], + "files": ["file.ts"] +} diff --git a/packages/eslint-plugin-tslint/tests/test-project/tsconfig.json b/packages/eslint-plugin-tslint/tests/test-project/tsconfig.json new file mode 100644 index 000000000000..fcd054ab4880 --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-project/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noImplicitAny": true + } +} diff --git a/packages/eslint-plugin-tslint/tests/test-project/tslint.json b/packages/eslint-plugin-tslint/tests/test-project/tslint.json new file mode 100644 index 000000000000..9d026172da7c --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-project/tslint.json @@ -0,0 +1,8 @@ +{ + "rules": { + "no-string-throw": true, + "no-var-keyword": true, + "prefer-const": true, + "radix": true + } +} diff --git a/packages/eslint-plugin-tslint/tests/test-tslint-rules-directory/alwaysFailRule.js b/packages/eslint-plugin-tslint/tests/test-tslint-rules-directory/alwaysFailRule.js new file mode 100644 index 000000000000..ef5d13e603d3 --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/test-tslint-rules-directory/alwaysFailRule.js @@ -0,0 +1,19 @@ +const Lint = require('tslint'); + +class Rule extends Lint.Rules.AbstractRule { + apply(sourceFile) { + return this.applyWithWalker( + new AlwaysFailWalker(sourceFile, this.getOptions()) + ); + } +} + +class AlwaysFailWalker extends Lint.RuleWalker { + visitSourceFile(node) { + this.addFailure( + this.createFailure(node.getStart(), node.getWidth(), 'failure') + ); + } +} + +exports.Rule = Rule; diff --git a/packages/eslint-plugin-tslint/tests/tsconfig.json b/packages/eslint-plugin-tslint/tests/tsconfig.json new file mode 100644 index 000000000000..aee0ec940fcd --- /dev/null +++ b/packages/eslint-plugin-tslint/tests/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "strict": true + } +} diff --git a/packages/eslint-plugin-tslint/tsconfig.json b/packages/eslint-plugin-tslint/tsconfig.json new file mode 100644 index 000000000000..d74357950e9c --- /dev/null +++ b/packages/eslint-plugin-tslint/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "./dist" + }, + "include": ["src"] +} diff --git a/packages/typescript-eslint-parser/package.json b/packages/typescript-eslint-parser/package.json index 5d523c5168b2..b8adaba02f3a 100644 --- a/packages/typescript-eslint-parser/package.json +++ b/packages/typescript-eslint-parser/package.json @@ -26,7 +26,9 @@ "eslint" ], "scripts": { + "prebuild": "npm run clean", "build": "tsc", + "clean": "rm -rf dist/", "test": "jest --coverage", "integration-tests": "docker-compose -f tests/integration/docker-compose.yml up", "kill-integration-test-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local" diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a9e5f3fdffec..4f4df3bce0f8 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -26,7 +26,9 @@ "syntax" ], "scripts": { + "prebuild": "npm run clean", "build": "tsc", + "clean": "rm -rf dist/", "test": "jest --coverage", "unit-tests": "jest \"./tests/lib/.*\"", "ast-alignment-tests": "jest spec.ts" diff --git a/yarn.lock b/yarn.lock index 130adc32b164..b2a4a3c2a9fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,13 +23,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== -"@commitlint/cli@^7.1.2", "@commitlint/cli@^7.3.1": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.3.1.tgz#3fa4f41b5363c061a4c9f82d32ad1f276e1e675d" - integrity sha512-/ySTlSegey0mOpz4TxikTCV1JaAPOpouMiGg18RI10lpL5cgD4FgbZUg5zsSv+ZzsobEBRdpuGAjg8vvCIkiWg== +"@commitlint/cli@^7.1.2", "@commitlint/cli@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.3.2.tgz#61abf30b48861e4fbd521690e6d4a3e1258980bb" + integrity sha512-QoVayW3kr6/pkWObaCmI6k8O02l/rOJmQIgy5785f6AVbUeHbLOVnh661XMunzAvDX2Cdz4mN+LenhsrLGsaug== dependencies: "@commitlint/format" "^7.3.1" - "@commitlint/lint" "^7.3.1" + "@commitlint/lint" "^7.3.2" "@commitlint/load" "^7.3.1" "@commitlint/read" "^7.3.1" babel-polyfill "6.26.0" @@ -74,15 +74,16 @@ dependencies: semver "5.6.0" -"@commitlint/lint@^7.3.1": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-7.3.1.tgz#ee54c636c0ec7238410ac5d5a6f63e2c7b879182" - integrity sha512-aPfjqoOHhXDbA7pb+S7yGv8SsgCgfpOXybzO2NoiqVIvcuWXE+FuqVYDLjmzjvptYGYCB0oDFkewxoeHCzQOzg== +"@commitlint/lint@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-7.3.2.tgz#e5323ce5b65512e37089ca9e5dfd065849edbf80" + integrity sha512-NInm96JP89lMNR77R4zJRj/vaQWc4Ie5vR/5G5auFFiHuwyKmRWfXbGMA7zVYpAylPRgewGaELhuRzNTUW0Log== dependencies: "@commitlint/is-ignored" "^7.3.1" "@commitlint/parse" "^7.3.1" "@commitlint/rules" "^7.3.1" babel-runtime "^6.23.0" + lodash "4.17.11" "@commitlint/load@^7.3.1": version "7.3.1" @@ -154,11 +155,11 @@ find-up "^2.1.0" "@commitlint/travis-cli@^7.1.2": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@commitlint/travis-cli/-/travis-cli-7.3.1.tgz#5e57a7d0d28bb3add0b4381889e60957dc931d3b" - integrity sha512-G0RaGdlgHbX50ejof3Lo/76XzPsC4nAgjGM41B6dlZcMK8huLPoi9VGZTq+VVEZysO500fz2fW84MywNNwwIBg== + version "7.3.2" + resolved "https://registry.yarnpkg.com/@commitlint/travis-cli/-/travis-cli-7.3.2.tgz#fa086b4389830a03931a316616ca13eade4f1bb7" + integrity sha512-3hmeQ7NRulD/VB9ifBjBmiEJl85kOffmMXCJEB2578SH1JpfyDAMrjy0ZwX/WL/yAkkJX8/e+XnEvpu5lhivyg== dependencies: - "@commitlint/cli" "^7.3.1" + "@commitlint/cli" "^7.3.2" babel-runtime "6.26.0" execa "0.9.0" @@ -793,7 +794,7 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/eslint@^4.16.5": +"@types/eslint@^4.16.3", "@types/eslint@^4.16.5": version "4.16.5" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-4.16.5.tgz#f0b56e011a3f7d01a380a568776f93ec56d7c911" integrity sha512-103C3Adr8UaucsjYBDdKzL9AZk6c6F2gKIlyZOxv48KtmnvNcXoDsEddF4N/DZJNoVFg6NGSbzYodvxix3Md2g== @@ -837,6 +838,13 @@ dependencies: "@types/lodash" "*" +"@types/lodash.memoize@^4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@types/lodash.memoize/-/lodash.memoize-4.1.4.tgz#d810e7cf438d322074b86bf3cfc14f8b5186619e" + integrity sha512-3u6RDBxMGQ+XM8lOD+Of5D1c4UZNwo5GmrYAIar6bruSpNb3feECCmG2Dr23/uZTCcEoGrMe/r84nelum3NpUQ== + dependencies: + "@types/lodash" "*" + "@types/lodash.unescape@^4.0.4": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/lodash.unescape/-/lodash.unescape-4.0.4.tgz#b8eec58cdd642d3a52adc13fbdee1ef0e878a132" @@ -1443,7 +1451,7 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -builtin-modules@^1.0.0: +builtin-modules@^1.0.0, 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= @@ -1598,7 +1606,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1729,7 +1737,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.14.1, commander@^2.9.0: +commander@^2.12.1, commander@^2.14.1, commander@^2.9.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== @@ -2817,9 +2825,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== + version "1.2.6" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.6.tgz#d3a1864a71876a2eb9b244e3bd8f606eb09568c0" + integrity sha512-BalK54tfK0pMC0jQFb2oHn1nz7JNQD/2ex5pBnCHgBi2xG7VV0cAOGy2RS2VbCqUXx5/6obMrMcQTJ8yjcGzbg== dependencies: nan "^2.9.2" node-pre-gyp "^0.10.0" @@ -4520,6 +4528,11 @@ lodash.map@^4.5.1: resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -4674,9 +4687,9 @@ map-visit@^1.0.0: object-visit "^1.0.0" math-random@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.2.tgz#8ab7f026363816c1e00b774d87dee67f61e37ad6" - integrity sha512-Bp2Bx2wFaUymE7pWi0bbldiheIXMvyzC3hRkT5YAv2qiqqJO5VB8KafgYgZmGCxkTmloLuAx3Jv2OmJ66990mg== + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== mem@^1.1.0: version "1.1.0" @@ -5398,9 +5411,9 @@ p-waterfall@^1.0.0: p-reduce "^1.0.0" pacote@^9.2.3: - version "9.3.0" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.3.0.tgz#ec0d21b739a625d81a19ae546386fedee3300bc1" - integrity sha512-uy5xghB5wUtmFS+uNhQGhlsIF9rfsfxw6Zsu2VpmSz4/f+8D2+5V1HwjHdSn7W6aQTrxNNmmoUF5qNE10/EVdA== + version "9.4.0" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.4.0.tgz#af979abdeb175cd347c3e33be3241af1ed254807" + integrity sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w== dependencies: bluebird "^3.5.3" cacache "^11.3.2" @@ -6018,7 +6031,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.x: +resolve@1.x, resolve@^1.3.2: version "1.9.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== @@ -6777,11 +6790,36 @@ ts-jest@^23.10.4: semver "^5.5" yargs-parser "10.x" -tslib@^1.9.0: +tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== +tslint@^5.11.0: + version "5.12.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.12.1.tgz#8cec9d454cf8a1de9b0a26d7bdbad6de362e52c1" + integrity sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw== + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.27.2" + +tsutils@^2.27.2: + 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" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"