diff --git a/lib/rules/test-case-property-ordering.js b/lib/rules/test-case-property-ordering.js index 73cb700f..335ec1dd 100644 --- a/lib/rules/test-case-property-ordering.js +++ b/lib/rules/test-case-property-ordering.js @@ -45,7 +45,8 @@ module.exports = { 'output', 'options', 'parser', - 'parserOptions', + 'languageOptions', // used in eslint flat config + 'parserOptions', // used in eslintrc config 'globals', 'env', 'errors', diff --git a/tests/lib/rules/test-case-property-ordering.js b/tests/lib/rules/test-case-property-ordering.js index cb20b85c..149278d1 100644 --- a/tests/lib/rules/test-case-property-ordering.js +++ b/tests/lib/rules/test-case-property-ordering.js @@ -214,5 +214,27 @@ ruleTester.run('test-case-property-ordering', rule, { }, ], }, + { + code: ` + new RuleTester().run('foo', bar, { + valid: [ + {\ncode: "foo",\noutput: "",\nerrors: ["baz"],\nlanguageOptions: "",\n}, + ] + }); + `, + output: ` + new RuleTester().run('foo', bar, { + valid: [ + {\ncode: "foo",\noutput: "",\nlanguageOptions: "",\nerrors: ["baz"],\n}, + ] + }); + `, + errors: [ + { + message: + 'The properties of a test case should be placed in a consistent order: [code, output, languageOptions, errors].', + }, + ], + }, ], });