From 2027bb11689b76c297f93ba8a918b35fe68e5b9d Mon Sep 17 00:00:00 2001 From: Christopher Rybicki Date: Sun, 2 Aug 2020 16:19:29 -0400 Subject: [PATCH 1/5] fix(eslint-plugin): [no-unsafe-assignment] fix typo in message (#2347) --- packages/eslint-plugin/src/rules/no-unsafe-assignment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts index e581862b0ed3..21e646483bcb 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts @@ -30,7 +30,7 @@ export default util.createRule({ unsafeArrayPatternFromTuple: 'Unsafe array destructuring of a tuple element with an any value.', unsafeAssignment: - 'Unsafe asignment of type {{sender}} to a variable of type {{receiver}}.', + 'Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.', unsafeArraySpread: 'Unsafe spread of an any value in an array.', }, schema: [], From fa169e79661821f0e0e64a56d6db9da42c3c8654 Mon Sep 17 00:00:00 2001 From: Soobin Bak Date: Mon, 3 Aug 2020 05:37:07 +0900 Subject: [PATCH 2/5] fix(eslint-plugin): [no-implied-eval] don't report when `Function` is imported (#2348) --- .../src/rules/no-implied-eval.ts | 20 +++++++++++++++++-- .../eslint-plugin/tests/fixtures/class.ts | 3 +++ .../tests/rules/no-implied-eval.test.ts | 5 +++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-implied-eval.ts b/packages/eslint-plugin/src/rules/no-implied-eval.ts index dd36fb73ec45..afda630b6b6c 100644 --- a/packages/eslint-plugin/src/rules/no-implied-eval.ts +++ b/packages/eslint-plugin/src/rules/no-implied-eval.ts @@ -35,6 +35,7 @@ export default util.createRule({ defaultOptions: [], create(context) { const parserServices = util.getParserServices(context); + const program = parserServices.program; const checker = parserServices.program.getTypeChecker(); function getCalleeName( @@ -113,14 +114,29 @@ export default util.createRule({ function checkImpliedEval( node: TSESTree.NewExpression | TSESTree.CallExpression, ): void { + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.callee); + const type = checker.getTypeAtLocation(tsNode); + const calleeName = getCalleeName(node.callee); if (calleeName === null) { return; } if (calleeName === FUNCTION_CONSTRUCTOR) { - context.report({ node, messageId: 'noFunctionConstructor' }); - return; + const symbol = type.getSymbol(); + if (symbol) { + const declarations = symbol.getDeclarations() ?? []; + for (const declaration of declarations) { + const sourceFile = declaration.getSourceFile(); + if (program.isSourceFileDefaultLibrary(sourceFile)) { + context.report({ node, messageId: 'noFunctionConstructor' }); + return; + } + } + } else { + context.report({ node, messageId: 'noFunctionConstructor' }); + return; + } } if (node.arguments.length === 0) { diff --git a/packages/eslint-plugin/tests/fixtures/class.ts b/packages/eslint-plugin/tests/fixtures/class.ts index 044e44e44aec..89f06af9e8ee 100644 --- a/packages/eslint-plugin/tests/fixtures/class.ts +++ b/packages/eslint-plugin/tests/fixtures/class.ts @@ -8,3 +8,6 @@ export const console = { log() {} }; export class Reducable { reduce() {} } + +// used by no-implied-eval test function imports +export class Function {} diff --git a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts index 818514c6b0ba..f5ceba4fe94a 100644 --- a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts +++ b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts @@ -6,6 +6,7 @@ const ruleTester = new RuleTester({ parserOptions: { tsconfigRootDir: rootDir, ecmaVersion: 2015, + sourceType: 'module', project: './tsconfig.json', }, parser: '@typescript-eslint/parser', @@ -241,6 +242,10 @@ const fn = (foo: () => void) => { execScript(foo); }; `, + ` +import { Function } from './class'; +new Function('foo'); + `, ], invalid: [ From 3ef6bd5cadc225e42ef1330d15919a39f53f2a2b Mon Sep 17 00:00:00 2001 From: "Gavin.Guohao.Wu" Date: Mon, 3 Aug 2020 04:42:00 +0800 Subject: [PATCH 3/5] feat(eslint-plugin): [naming-convention] allow specifying an array of selectors (#2335) Co-authored-by: Gavin --- .../docs/rules/naming-convention.md | 23 ++- .../src/rules/naming-convention.ts | 83 ++++++++-- .../tests/rules/naming-convention.test.ts | 144 +++++++++++++++--- 3 files changed, 220 insertions(+), 30 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index 0cd4d9324bed..d57bc1c69daf 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -1,7 +1,7 @@ # Enforces naming conventions for everything across a codebase (`naming-convention`) Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable. -Additionally, a well designed style guide can help communicate intent, such as by enforcing all private properties begin with an `_`, and all global-level constants are written in `UPPER_CASE`. +Additionally, a well-designed style guide can help communicate intent, such as by enforcing all private properties begin with an `_`, and all global-level constants are written in `UPPER_CASE`. There are many different rules that have existed over time, but they have had the problem of not having enough granularity, meaning it was hard to have a well defined style guide, and most of the time you needed 3 or more rules at once to enforce different conventions, hoping they didn't conflict. @@ -39,7 +39,7 @@ type Options = { suffix?: string[]; // selector options - selector: Selector; + selector: Selector | Selector[]; filter?: | string | { @@ -155,6 +155,8 @@ If these are provided, the identifier must start with one of the provided values ### Selector Options - `selector` (see "Allowed Selectors, Modifiers and Types" below). + - Accepts one or array of selectors to define an option block that applies to one or multiple selectors. + - For example, if you provide `{ selector: ['variable', 'function'] }`, then it will apply the same option to variable and function nodes. - `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`private`/`public`/`protected`), or if the thing is `static`, etc. - The name must match _all_ of the modifiers. - For example, if you provide `{ modifiers: ['private', 'static', 'readonly'] }`, then it will only match something that is `private static readonly`, and something that is just `private` will not match. @@ -361,6 +363,23 @@ This allows you to emulate the old `interface-name-prefix` rule. } ``` +### Enforce that variable and function names are in camelCase + +This allows you to lint multiple type with same pattern. + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": ["variable", "function"], + "format": ["camelCase"], + "leadingUnderscore": "allow" + } + ] +} +``` + ### Ignore properties that require quotes Sometimes you have to use a quoted name that breaks the convention (for example, HTTP headers). diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index fdf1f0617884..7d40e0862cb0 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -1,8 +1,8 @@ import { AST_NODE_TYPES, JSONSchema, - TSESTree, TSESLint, + TSESTree, } from '@typescript-eslint/experimental-utils'; import * as ts from 'typescript'; import * as util from '../util'; @@ -111,7 +111,9 @@ interface Selector { prefix?: string[]; suffix?: string[]; // selector options - selector: IndividualAndMetaSelectorsString; + selector: + | IndividualAndMetaSelectorsString + | IndividualAndMetaSelectorsString[]; modifiers?: ModifiersString[]; types?: TypeModifiersString[]; filter?: @@ -249,10 +251,60 @@ function selectorSchema( }, ]; } + +function selectorsSchema(): JSONSchema.JSONSchema4 { + return { + type: 'object', + properties: { + ...FORMAT_OPTIONS_PROPERTIES, + ...{ + filter: { + oneOf: [ + { + type: 'string', + minLength: 1, + }, + MATCH_REGEX_SCHEMA, + ], + }, + selector: { + type: 'array', + items: { + type: 'string', + enum: [ + ...util.getEnumNames(MetaSelectors), + ...util.getEnumNames(Selectors), + ], + }, + additionalItems: false, + }, + }, + }, + modifiers: { + type: 'array', + items: { + type: 'string', + enum: util.getEnumNames(Modifiers), + }, + additionalItems: false, + }, + types: { + type: 'array', + items: { + type: 'string', + enum: util.getEnumNames(TypeModifiers), + }, + additionalItems: false, + }, + required: ['selector', 'format'], + additionalProperties: false, + }; +} const SCHEMA: JSONSchema.JSONSchema4 = { type: 'array', items: { oneOf: [ + selectorsSchema(), ...selectorSchema('default', false, util.getEnumNames(Modifiers)), ...selectorSchema('variableLike', false), @@ -765,15 +817,15 @@ type ValidatorFunction = ( ) => void; type ParsedOptions = Record; type Context = Readonly>; + function parseOptions(context: Context): ParsedOptions { const normalizedOptions = context.options.map(opt => normalizeOption(opt)); - const parsedOptions = util.getEnumNames(Selectors).reduce((acc, k) => { + return util.getEnumNames(Selectors).reduce((acc, k) => { acc[k] = createValidator(k, context, normalizedOptions); return acc; }, {} as ParsedOptions); - - return parsedOptions; } + function createValidator( type: SelectorsString, context: Context, @@ -1219,7 +1271,7 @@ function normalizeOption(option: Selector): NormalizedSelector { weight |= 1 << 30; } - return { + const normalizedOption = { // format options format: option.format ? option.format.map(f => PredefinedFormats[f]) : null, custom: option.custom @@ -1238,10 +1290,6 @@ function normalizeOption(option: Selector): NormalizedSelector { : null, prefix: option.prefix && option.prefix.length > 0 ? option.prefix : null, suffix: option.suffix && option.suffix.length > 0 ? option.suffix : null, - // selector options - selector: isMetaSelector(option.selector) - ? MetaSelectors[option.selector] - : Selectors[option.selector], modifiers: option.modifiers?.map(m => Modifiers[m]) ?? null, types: option.types?.map(m => TypeModifiers[m]) ?? null, filter: @@ -1256,6 +1304,21 @@ function normalizeOption(option: Selector): NormalizedSelector { // calculated ordering weight based on modifiers modifierWeight: weight, }; + + const selectors = Array.isArray(option.selector) + ? option.selector + : [option.selector]; + + return { + selector: selectors + .map(selector => + isMetaSelector(selector) + ? MetaSelectors[selector] + : Selectors[selector], + ) + .reduce((accumulator, selector) => accumulator | selector), + ...normalizedOption, + }; } function isCorrectType( diff --git a/packages/eslint-plugin/tests/rules/naming-convention.test.ts b/packages/eslint-plugin/tests/rules/naming-convention.test.ts index 84e48af1a589..040c2f7eba4f 100644 --- a/packages/eslint-plugin/tests/rules/naming-convention.test.ts +++ b/packages/eslint-plugin/tests/rules/naming-convention.test.ts @@ -205,33 +205,46 @@ function createInvalidTestCases( options: Selector, messageId: MessageIds, data: Record = {}, - ): TSESLint.InvalidTestCase => ({ - options: [ - { - ...options, - filter: IGNORED_FILTER, - }, - ], - code: `// ${JSON.stringify(options)}\n${test.code - .map(code => code.replace(REPLACE_REGEX, preparedName)) - .join('\n')}`, - errors: test.code.map(() => ({ + ): TSESLint.InvalidTestCase => { + const selectors = Array.isArray(test.options.selector) + ? test.options.selector + : [test.options.selector]; + const errorsTemplate = selectors.map(selector => ({ messageId, - ...(test.options.selector !== 'default' && - test.options.selector !== 'variableLike' && - test.options.selector !== 'memberLike' && - test.options.selector !== 'typeLike' + ...(selector !== 'default' && + selector !== 'variableLike' && + selector !== 'memberLike' && + selector !== 'typeLike' ? { data: { - type: selectorTypeToMessageString(test.options.selector), + type: selectorTypeToMessageString(selector), name: preparedName, ...data, }, } : // meta-types will use the correct selector, so don't assert on data shape {}), - })), - }); + })); + + const errors: { + data?: { type: string; name: string }; + messageId: MessageIds; + }[] = []; + test.code.forEach(() => errors.push(...errorsTemplate)); + + return { + options: [ + { + ...options, + filter: IGNORED_FILTER, + }, + ], + code: `// ${JSON.stringify(options)}\n${test.code + .map(code => code.replace(REPLACE_REGEX, preparedName)) + .join('\n')}`, + errors: errors, + }; + }; const prefixSingle = ['MyPrefix']; const prefixMulti = ['MyPrefix1', 'MyPrefix2']; @@ -714,6 +727,27 @@ ruleTester.run('naming-convention', rule, { }, ], }, + { + code: ` + let foo = 'a'; + const _foo = 1; + interface foo {} + class bar {} + function fooFunctionBar() {} + function _fooFunctionBar() {} + `, + options: [ + { + selector: ['default', 'typeLike', 'function'], + format: ['camelCase'], + custom: { + regex: /^unused_\w/.source, + match: false, + }, + leadingUnderscore: 'allow', + }, + ], + }, { code: ` const match = 'test'.match(/test/); @@ -1029,6 +1063,80 @@ ruleTester.run('naming-convention', rule, { }, ], }, + { + code: ` + let unused_foo = 'a'; + const _unused_foo = 1; + function foo_bar() {} + interface IFoo {} + class IBar {} + `, + options: [ + { + selector: ['variable', 'function'], + format: ['camelCase'], + leadingUnderscore: 'allow', + }, + { + selector: ['class', 'interface'], + format: ['PascalCase'], + custom: { + regex: /^I[A-Z]/.source, + match: false, + }, + }, + ], + errors: [ + { + messageId: 'doesNotMatchFormat', + line: 2, + data: { + type: 'Variable', + name: 'unused_foo', + formats: 'camelCase', + }, + }, + { + messageId: 'doesNotMatchFormatTrimmed', + line: 3, + data: { + type: 'Variable', + name: '_unused_foo', + processedName: 'unused_foo', + formats: 'camelCase', + }, + }, + { + messageId: 'doesNotMatchFormat', + line: 4, + data: { + type: 'Function', + name: 'foo_bar', + formats: 'camelCase', + }, + }, + { + messageId: 'satisfyCustom', + line: 5, + data: { + type: 'Interface', + name: 'IFoo', + regex: '/^I[A-Z]/u', + regexMatch: 'not match', + }, + }, + { + messageId: 'satisfyCustom', + line: 6, + data: { + type: 'Class', + name: 'IBar', + regex: '/^I[A-Z]/u', + regexMatch: 'not match', + }, + }, + ], + }, { code: ` const foo = { From 4f38ea39c97289db11501d6368d01db8c5787257 Mon Sep 17 00:00:00 2001 From: bobstrange Date: Mon, 3 Aug 2020 05:44:11 +0900 Subject: [PATCH 4/5] feat(eslint-plugin): add `prefer-enum-initializers` rule (#2326) --- packages/eslint-plugin/README.md | 1 + .../docs/rules/prefer-enum-initializers.md | 70 +++++ packages/eslint-plugin/src/configs/all.ts | 1 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/prefer-enum-initializers.ts | 73 ++++++ .../rules/prefer-enum-initializers.test.ts | 241 ++++++++++++++++++ 6 files changed, 388 insertions(+) create mode 100644 packages/eslint-plugin/docs/rules/prefer-enum-initializers.md create mode 100644 packages/eslint-plugin/src/rules/prefer-enum-initializers.ts create mode 100644 packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index b33606921784..cb8a5546142c 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -147,6 +147,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@typescript-eslint/no-unused-vars-experimental`](./docs/rules/no-unused-vars-experimental.md) | Disallow unused variables and arguments | | | | | [`@typescript-eslint/no-var-requires`](./docs/rules/no-var-requires.md) | Disallows the use of require statements except in import statements | :heavy_check_mark: | | | | [`@typescript-eslint/prefer-as-const`](./docs/rules/prefer-as-const.md) | Prefer usage of `as const` over literal type | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/prefer-enum-initializers`](./docs/rules/prefer-enum-initializers.md) | Prefer initializing each enums member value | | | | | [`@typescript-eslint/prefer-for-of`](./docs/rules/prefer-for-of.md) | Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated | | | | | [`@typescript-eslint/prefer-function-type`](./docs/rules/prefer-function-type.md) | Use function types instead of interfaces with call signatures | | :wrench: | | | [`@typescript-eslint/prefer-includes`](./docs/rules/prefer-includes.md) | Enforce `includes` method over `indexOf` method | | :wrench: | :thought_balloon: | diff --git a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md new file mode 100644 index 000000000000..1e8f568d721f --- /dev/null +++ b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md @@ -0,0 +1,70 @@ +# Prefer initializing each enums member value (`prefer-enum-initializers`) + +This rule recommends having each `enum`s member value explicitly initialized. + +`enum`s are a practical way to organize semantically related constant values. However, by implicitly defining values, `enum`s can lead to unexpected bugs if it's modified without paying attention to the order of its items. + +## Rule Details + +`enum`s infers sequential numbers automatically when initializers are omitted: + +```ts +enum Status { + Open, // infer 0 + Closed, // infer 1 +} +``` + +If a new member is added to the top of `Status`, both `Open` and `Closed` would have its values altered: + +```ts +enum Status { + Pending, // infer 0 + Open, // infer 1 + Closed, // infer 2 +} +``` + +Examples of **incorrect** code for this rule: + +```ts +enum Status { + Open = 1, + Close, +} + +enum Direction { + Up, + Down, +} + +enum Color { + Red, + Green = 'Green' + Blue = 'Blue', +} +``` + +Examples of **correct** code for this rule: + +```ts +enum Status { + Open = 'Open', + Close = 'Close', +} + +enum Direction { + Up = 1, + Down = 2, +} + +enum Color { + Red = 'Red', + Green = 'Green', + Blue = 'Blue', +} +``` + +## When Not To Use It + +If you don't care about `enum`s having implicit values you can safely disable this rule. diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index e78feb7d44ac..8361bde29b2c 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -97,6 +97,7 @@ export = { '@typescript-eslint/no-useless-constructor': 'error', '@typescript-eslint/no-var-requires': 'error', '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-enum-initializers': 'error', '@typescript-eslint/prefer-for-of': 'error', '@typescript-eslint/prefer-function-type': 'error', '@typescript-eslint/prefer-includes': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 73083bedfe41..85d0642fc791 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -70,6 +70,7 @@ import noUseBeforeDefine from './no-use-before-define'; import noUselessConstructor from './no-useless-constructor'; import noVarRequires from './no-var-requires'; import preferAsConst from './prefer-as-const'; +import preferEnumInitializers from './prefer-enum-initializers'; import preferForOf from './prefer-for-of'; import preferFunctionType from './prefer-function-type'; import preferIncludes from './prefer-includes'; @@ -169,6 +170,7 @@ export default { 'no-useless-constructor': noUselessConstructor, 'no-var-requires': noVarRequires, 'prefer-as-const': preferAsConst, + 'prefer-enum-initializers': preferEnumInitializers, 'prefer-for-of': preferForOf, 'prefer-function-type': preferFunctionType, 'prefer-includes': preferIncludes, diff --git a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts new file mode 100644 index 000000000000..1a5c1248c89a --- /dev/null +++ b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts @@ -0,0 +1,73 @@ +import { TSESTree } from '@typescript-eslint/experimental-utils'; +import * as util from '../util'; +import { TSESLint } from '@typescript-eslint/experimental-utils'; + +type MessageIds = 'defineInitializer' | 'defineInitializerSuggestion'; + +export default util.createRule<[], MessageIds>({ + name: 'prefer-enum-initializers', + meta: { + type: 'suggestion', + docs: { + description: 'Prefer initializing each enums member value', + category: 'Best Practices', + recommended: false, + suggestion: true, + }, + messages: { + defineInitializer: + "The value of the member '{{ name }}' should be explicitly defined", + defineInitializerSuggestion: + 'Can be fixed to {{ name }} = {{ suggested }}', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const sourceCode = context.getSourceCode(); + + function TSEnumDeclaration(node: TSESTree.TSEnumDeclaration): void { + const { members } = node; + + members.forEach((member, index) => { + if (member.initializer == null) { + const name = sourceCode.getText(member); + context.report({ + node: member, + messageId: 'defineInitializer', + data: { + name, + }, + suggest: [ + { + messageId: 'defineInitializerSuggestion', + data: { name, suggested: index }, + fix: (fixer): TSESLint.RuleFix => { + return fixer.replaceText(member, `${name} = ${index}`); + }, + }, + { + messageId: 'defineInitializerSuggestion', + data: { name, suggested: index + 1 }, + fix: (fixer): TSESLint.RuleFix => { + return fixer.replaceText(member, `${name} = ${index + 1}`); + }, + }, + { + messageId: 'defineInitializerSuggestion', + data: { name, suggested: `'${name}'` }, + fix: (fixer): TSESLint.RuleFix => { + return fixer.replaceText(member, `${name} = '${name}'`); + }, + }, + ], + }); + } + }); + } + + return { + TSEnumDeclaration, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts b/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts new file mode 100644 index 000000000000..0a49c52d945d --- /dev/null +++ b/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts @@ -0,0 +1,241 @@ +import rule from '../../src/rules/prefer-enum-initializers'; +import { RuleTester } from '../RuleTester'; + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('prefer-enum-initializers', rule, { + valid: [ + ` +enum Direction {} + `, + ` +enum Direction { + Up = 1, +} + `, + ` +enum Direction { + Up = 1, + Down = 2, +} + `, + ` +enum Direction { + Up = 'Up', + Down = 'Down', +} + `, + ], + // We need to keep indentation for avoiding @typescript-eslint/internal/plugin-test-formatting. + // Use trimRight() to make tests pass for now. https://github.com/typescript-eslint/typescript-eslint/pull/2326#discussion_r461760044 + invalid: [ + { + code: ` +enum Direction { + Up, +} + `.trimRight(), + errors: [ + { + messageId: 'defineInitializer', + data: { name: 'Up' }, + line: 3, + suggestions: [ + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 0, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 1, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 'Up', +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +enum Direction { + Up, + Down, +} + `.trimRight(), + errors: [ + { + messageId: 'defineInitializer', + data: { name: 'Up' }, + line: 3, + suggestions: [ + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 0, + Down, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 1, + Down, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 'Up', + Down, +} + `.trimRight(), + }, + ], + }, + { + messageId: 'defineInitializer', + data: { name: 'Down' }, + line: 4, + suggestions: [ + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up, + Down = 1, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up, + Down = 2, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up, + Down = 'Down', +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +enum Direction { + Up = 'Up', + Down, +} + `.trimRight(), + errors: [ + { + messageId: 'defineInitializer', + data: { name: 'Down' }, + line: 4, + suggestions: [ + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 'Up', + Down = 1, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 'Up', + Down = 2, +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 'Up', + Down = 'Down', +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +enum Direction { + Up, + Down = 'Down', +} + `.trimRight(), + errors: [ + { + messageId: 'defineInitializer', + data: { name: 'Up' }, + line: 3, + suggestions: [ + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 0, + Down = 'Down', +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 1, + Down = 'Down', +} + `.trimRight(), + }, + { + messageId: 'defineInitializerSuggestion', + output: ` +enum Direction { + Up = 'Up', + Down = 'Down', +} + `.trimRight(), + }, + ], + }, + ], + }, + ], +}); From 522277d74d15467b9a1ec29fcd0f4eec0b0aaa9d Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 3 Aug 2020 17:02:33 +0000 Subject: [PATCH 5/5] chore: publish v3.8.0 --- CHANGELOG.md | 18 ++++++++++++++++++ lerna.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-internal/package.json | 4 ++-- packages/eslint-plugin-tslint/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-tslint/package.json | 6 +++--- packages/eslint-plugin/CHANGELOG.md | 18 ++++++++++++++++++ packages/eslint-plugin/package.json | 4 ++-- packages/experimental-utils/CHANGELOG.md | 8 ++++++++ packages/experimental-utils/package.json | 6 +++--- packages/parser/CHANGELOG.md | 8 ++++++++ packages/parser/package.json | 10 +++++----- packages/scope-manager/CHANGELOG.md | 8 ++++++++ packages/scope-manager/package.json | 8 ++++---- packages/shared-fixtures/CHANGELOG.md | 8 ++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 8 ++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 8 ++++++++ packages/visitor-keys/package.json | 4 ++-- 22 files changed, 136 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5331e6ec351f..9c160dc84bab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + + +### Bug Fixes + +* **eslint-plugin:** [no-implied-eval] don't report when `Function` is imported ([#2348](https://github.com/typescript-eslint/typescript-eslint/issues/2348)) ([fa169e7](https://github.com/typescript-eslint/typescript-eslint/commit/fa169e79661821f0e0e64a56d6db9da42c3c8654)) +* **eslint-plugin:** [no-unsafe-assignment] fix typo in message ([#2347](https://github.com/typescript-eslint/typescript-eslint/issues/2347)) ([2027bb1](https://github.com/typescript-eslint/typescript-eslint/commit/2027bb11689b76c297f93ba8a918b35fe68e5b9d)) + + +### Features + +* **eslint-plugin:** [naming-convention] allow specifying an array of selectors ([#2335](https://github.com/typescript-eslint/typescript-eslint/issues/2335)) ([3ef6bd5](https://github.com/typescript-eslint/typescript-eslint/commit/3ef6bd5cadc225e42ef1330d15919a39f53f2a2b)) +* **eslint-plugin:** add `prefer-enum-initializers` rule ([#2326](https://github.com/typescript-eslint/typescript-eslint/issues/2326)) ([4f38ea3](https://github.com/typescript-eslint/typescript-eslint/commit/4f38ea39c97289db11501d6368d01db8c5787257)) + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) diff --git a/lerna.json b/lerna.json index a6944297f68c..b9fc5bac0e6b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "3.7.1", + "version": "3.8.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index b44d352247c1..25c2070f788f 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 54c3dd058c1c..17438fd6484c 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "3.7.1", + "version": "3.8.0", "private": true, "main": "dist/index.js", "scripts": { @@ -13,7 +13,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "3.7.1", + "@typescript-eslint/experimental-utils": "3.8.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index a21a201ece6e..3d3d3529c27d 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 7d5511168cb5..7bbb5ba58aab 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "3.7.1", + "version": "3.8.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "TSLint wrapper plugin for ESLint", @@ -32,7 +32,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "3.7.1", + "@typescript-eslint/experimental-utils": "3.8.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -42,6 +42,6 @@ }, "devDependencies": { "@types/lodash": "^4.14.149", - "@typescript-eslint/parser": "3.7.1" + "@typescript-eslint/parser": "3.8.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 169603b8f922..fd7dc460a2dd 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + + +### Bug Fixes + +* **eslint-plugin:** [no-implied-eval] don't report when `Function` is imported ([#2348](https://github.com/typescript-eslint/typescript-eslint/issues/2348)) ([fa169e7](https://github.com/typescript-eslint/typescript-eslint/commit/fa169e79661821f0e0e64a56d6db9da42c3c8654)) +* **eslint-plugin:** [no-unsafe-assignment] fix typo in message ([#2347](https://github.com/typescript-eslint/typescript-eslint/issues/2347)) ([2027bb1](https://github.com/typescript-eslint/typescript-eslint/commit/2027bb11689b76c297f93ba8a918b35fe68e5b9d)) + + +### Features + +* **eslint-plugin:** [naming-convention] allow specifying an array of selectors ([#2335](https://github.com/typescript-eslint/typescript-eslint/issues/2335)) ([3ef6bd5](https://github.com/typescript-eslint/typescript-eslint/commit/3ef6bd5cadc225e42ef1330d15919a39f53f2a2b)) +* **eslint-plugin:** add `prefer-enum-initializers` rule ([#2326](https://github.com/typescript-eslint/typescript-eslint/issues/2326)) ([4f38ea3](https://github.com/typescript-eslint/typescript-eslint/commit/4f38ea39c97289db11501d6368d01db8c5787257)) + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 57692bd5a501..a60e1dac19a2 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "3.7.1", + "version": "3.8.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -42,7 +42,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "3.7.1", + "@typescript-eslint/experimental-utils": "3.8.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 4082bc93cdae..1cb613acb177 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/experimental-utils diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 2d4c28de14c3..312c5f34f65f 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "3.7.1", + "version": "3.8.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,8 +40,8 @@ }, "dependencies": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.7.1", - "@typescript-eslint/typescript-estree": "3.7.1", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/typescript-estree": "3.8.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 9327c553f0df..2428170b8f56 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 8a512ea5f462..a494e2c4f4ee 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "3.7.1", + "version": "3.8.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,14 +44,14 @@ }, "dependencies": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.7.1", - "@typescript-eslint/types": "3.7.1", - "@typescript-eslint/typescript-estree": "3.7.1", + "@typescript-eslint/experimental-utils": "3.8.0", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/typescript-estree": "3.8.0", "eslint-visitor-keys": "^1.1.0" }, "devDependencies": { "@types/glob": "^7.1.1", - "@typescript-eslint/shared-fixtures": "3.7.1", + "@typescript-eslint/shared-fixtures": "3.8.0", "glob": "*" }, "peerDependenciesMeta": { diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index f3f4718e3993..120129d4119b 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 74904dc6417b..99dc3e8c02b6 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "3.7.1", + "version": "3.8.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,11 +39,11 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "3.7.1", - "@typescript-eslint/visitor-keys": "3.7.1" + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/visitor-keys": "3.8.0" }, "devDependencies": { - "@typescript-eslint/typescript-estree": "3.7.1", + "@typescript-eslint/typescript-estree": "3.8.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 92e60717f21c..a4ef51d33576 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index 41614bd2dd65..924a143c022f 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "3.7.1", + "version": "3.8.0", "private": true, "scripts": { "build": "tsc -b tsconfig.build.json", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 3c6c933b94fb..fde9d02f1751 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 14983d822a66..0763b31e0c1d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "3.7.1", + "version": "3.8.0", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 41d278344f20..9f82ac5ad1f3 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 4703e2cbe354..28a04f2ba2aa 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "3.7.1", + "version": "3.8.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -40,8 +40,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "3.7.1", - "@typescript-eslint/visitor-keys": "3.7.1", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/visitor-keys": "3.8.0", "debug": "^4.1.1", "glob": "^7.1.6", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/lodash": "^4.14.149", "@types/semver": "^7.1.0", "@types/tmp": "^0.2.0", - "@typescript-eslint/shared-fixtures": "3.7.1", + "@typescript-eslint/shared-fixtures": "3.8.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 6dce638d7f97..6748712e503a 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [3.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.1...v3.8.0) (2020-08-03) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [3.7.1](https://github.com/typescript-eslint/typescript-eslint/compare/v3.7.0...v3.7.1) (2020-07-27) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index f716bdae70cb..b2c2bf3e3aa2 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "3.7.1", + "version": "3.8.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "keywords": [ "eslint", @@ -39,7 +39,7 @@ "eslint-visitor-keys": "^1.1.0" }, "devDependencies": { - "@typescript-eslint/types": "3.7.1" + "@typescript-eslint/types": "3.8.0" }, "funding": { "type": "opencollective",