diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 1d8ae897d31c..103caeb58ad1 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -26,7 +26,8 @@ function parseReadme(): { // find the table const rulesTables = readme.filter( - (token): token is marked.Tokens.Table => token.type === 'table', + (token): token is marked.Tokens.Table => + 'type' in token && token.type === 'table', ); if (rulesTables.length !== 2) { throw Error('Could not find both rules tables in README.md'); diff --git a/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts b/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts index 55264e918e71..06d9019f38a6 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts @@ -1,6 +1,6 @@ import { TSESLint } from '@typescript-eslint/experimental-utils'; import rule from '../../src/rules/no-unused-expressions'; -import { RuleTester } from '../RuleTester'; +import { noFormat, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parserOptions: { @@ -255,7 +255,7 @@ namespace Foo { ]), }, { - code: ` + code: noFormat` function foo() { const foo = true; diff --git a/packages/eslint-plugin/tests/rules/typedef.test.ts b/packages/eslint-plugin/tests/rules/typedef.test.ts index 93528da75949..f3c240077168 100644 --- a/packages/eslint-plugin/tests/rules/typedef.test.ts +++ b/packages/eslint-plugin/tests/rules/typedef.test.ts @@ -1,5 +1,5 @@ import rule from '../../src/rules/typedef'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { RuleTester, getFixturesRootDir, noFormat } from '../RuleTester'; const rootDir = getFixturesRootDir(); const ruleTester = new RuleTester({ @@ -263,9 +263,8 @@ ruleTester.run('typedef', rule, { ], }, { - code: ` + code: noFormat` type Test = { - // prettier-ignore [i: string]; }; `, @@ -775,9 +774,8 @@ class Foo { ], }, { - code: ` + code: noFormat` type Test = { - // prettier-ignore [i: string]; }; `, @@ -811,9 +809,8 @@ class Foo { ], }, { - code: ` + code: noFormat` interface Test { - // prettier-ignore [i: string]; } `, diff --git a/packages/experimental-utils/src/json-schema.ts b/packages/experimental-utils/src/json-schema.ts index 8e11b8b3caa2..4b2b1abfe33d 100644 --- a/packages/experimental-utils/src/json-schema.ts +++ b/packages/experimental-utils/src/json-schema.ts @@ -2,7 +2,6 @@ // If we do export *, then it will also export these function declarations. // This will cause typescript to not scrub the require from the build, breaking anyone who doesn't have it as a dependency -// eslint-disable-next-line import/no-extraneous-dependencies export { JSONSchema4, JSONSchema4Type, @@ -21,4 +20,4 @@ export { JSONSchema7Version, ValidationError, ValidationResult, -} from 'json-schema'; +} from 'json-schema'; // eslint-disable-line import/no-extraneous-dependencies diff --git a/yarn.lock b/yarn.lock index ac48bbd799f3..1f9392516f0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1579,7 +1579,7 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/debug@^4.1.5": +"@types/debug@*", "@types/debug@^4.1.5": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== @@ -1661,7 +1661,7 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/lodash@^4.14.149": +"@types/lodash@*", "@types/lodash@^4.14.149": version "4.14.161" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.161.tgz#a21ca0777dabc6e4f44f3d07f37b765f54188b18" integrity sha512-EP6O3Jkr7bXvZZSZYlsgt5DIjiGr0dXP1/jVEwVLTFgg0d+3lWVQkRavYVQszV7dYUwvg0B8R0MBDpcmXg7XIA== @@ -1696,7 +1696,7 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prettier@^2.0.0", "@types/prettier@^2.1.0": +"@types/prettier@*", "@types/prettier@^2.0.0", "@types/prettier@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.0.tgz#5f96562c1075ee715a5b138f0b7f591c1f40f6b8" integrity sha512-hiYA88aHiEIgDmeKlsyVsuQdcFn3Z2VuFd/Xm/HCnGnPD8UFU5BM128uzzRVVGEzKDKYUrRsRH9S2o+NUy/3IA==