From e1469411b2eaae1e37435f6bdb8fdedcbba78ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Tue, 30 Apr 2024 17:17:43 +0800 Subject: [PATCH] feat!: add name to test-case-property-ordering default options --- docs/rules/test-case-property-ordering.md | 2 +- lib/rules/test-case-property-ordering.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/rules/test-case-property-ordering.md b/docs/rules/test-case-property-ordering.md index c488ceca..75b648f1 100644 --- a/docs/rules/test-case-property-ordering.md +++ b/docs/rules/test-case-property-ordering.md @@ -12,7 +12,7 @@ This rule enforces that the properties of RuleTester test cases are arranged in This rule has an array option: -- `["filename", "code", "output", "options", "parser", "languageOptions", "parserOptions", "globals", "env", "errors"]` (default): The properties of a test case should be placed in a consistent order. +- `["name", "filename", "code", "output", "options", "parser", "languageOptions", "parserOptions", "globals", "env", "errors"]` (default): The properties of a test case should be placed in a consistent order. Examples of **incorrect** code for this rule: diff --git a/lib/rules/test-case-property-ordering.js b/lib/rules/test-case-property-ordering.js index e0e5b50a..cd129b0f 100644 --- a/lib/rules/test-case-property-ordering.js +++ b/lib/rules/test-case-property-ordering.js @@ -40,6 +40,7 @@ module.exports = { // Public // ---------------------------------------------------------------------- const order = context.options[0] || [ + 'name', 'filename', 'code', 'output',