diff --git a/.vscode/launch.json b/.vscode/launch.json index 15c6b1bbb3d..35c5c3194ec 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,8 @@ "program": "${workspaceFolder}/node_modules/jest/bin/jest.js", "args": [ "--runInBand", - "tests/rules/${fileBasenameNoExtension}" + // needs the '' around it so that the () are properly handled + "'tests/(.+/)?${fileBasenameNoExtension}'" ], "sourceMaps": true, "console": "integratedTerminal", diff --git a/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts b/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts index d5dfed8a647..e67ec96aed2 100644 --- a/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts @@ -13,6 +13,11 @@ ruleTester.run('arrow-parens', rule, { 'const foo = (t: T) => {};', 'const foo = ((t: T) => {});', 'const foo = function (t: T) {};', + ` +const foo = (bar: any): void => { + // Do nothing +} + `, { code: 'const foo = t => {};', options: ['as-needed'],