diff --git a/tests/lib/rules/utils.js b/tests/lib/rules/utils.js index 3a0349b..93d90f3 100644 --- a/tests/lib/rules/utils.js +++ b/tests/lib/rules/utils.js @@ -1,4 +1,16 @@ +const eslintPkg = require('eslint/package.json'); + +const USE_LANGUAGE_OPTIONS = eslintPkg.version.startsWith('9.'); + function ecmaVersion(version) { + if (USE_LANGUAGE_OPTIONS) { + return { + languageOptions: { + ecmaVersion: version + } + }; + } + return { parserOptions: { ecmaVersion: version