Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45a8830

Browse files
Corrected ESLint.version check
1 parent c7bf8cc commit 45a8830

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
# lowest possible version
252252
'6.0.0',
253253
# somewhere in the middle for sanity check
254-
'~7.32.0',
254+
'7.32.0',
255255
# highest possible version
256256
'^8.0.0',
257257
]

packages/utils/tests/eslint-utils/rule-tester/RuleTester.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ const NOOP_RULE: RuleModule<'error', []> = {
102102
};
103103

104104
describe('RuleTester', () => {
105-
if (semver.satisfies((ESLint as { version: string }).version, '>=8')) {
105+
if (
106+
'version' in (ESLint as {}) &&
107+
semver.satisfies((ESLint as { version: string }).version, '>=8')
108+
) {
106109
it('automatically sets the filename for tests', () => {
107110
const ruleTester = new RuleTester({
108111
parser: '@typescript-eslint/parser',

0 commit comments

Comments
 (0)