Skip to content

Commit c5b206b

Browse files
Merge pull request #211 from MikeMcC399/property-ordering
test: add property ordering rules
2 parents a109c4a + f53f7df commit c5b206b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export default [
1818
'eslint-plugin/require-meta-docs-url':
1919
['error', { 'pattern': 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/{{name}}.md' }],
2020
'eslint-plugin/require-meta-docs-description': 'error',
21+
'eslint-plugin/meta-property-ordering': 'error',
22+
'eslint-plugin/test-case-property-ordering': 'error',
2123
'n/no-extraneous-require':
2224
['error', { 'allowModules': ['jest-config'] }],
2325
'mocha/no-mocha-arrows': 'off',

tests-legacy/lib/rules/unsafe-to-chain-command.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ ruleTester.run('action-ends-chain', rule, {
4242
},
4343
{
4444
code: 'cy.get("new-todo").customType("todo A{enter}").customClick();',
45+
options: [{ methods: ['customType', 'customClick'] }],
4546
parserOptions,
4647
errors,
47-
options: [{ methods: ['customType', 'customClick'] }],
4848
},
4949
{
5050
code: 'cy.get("new-todo").customPress("Enter").customScroll();',
51+
options: [{ methods: [/customPress/, /customScroll/] }],
5152
parserOptions,
5253
errors,
53-
options: [{ methods: [/customPress/, /customScroll/] }],
5454
},
5555
],
5656
})

tests/lib/rules/unsafe-to-chain-command.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ ruleTester.run('action-ends-chain', rule, {
2222
{ code: 'cy.get("new-todo").focus().should("have.class", "active");', errors },
2323
{
2424
code: 'cy.get("new-todo").customType("todo A{enter}").customClick();',
25-
errors,
2625
options: [{ methods: ['customType', 'customClick'] }],
26+
errors,
2727
},
2828
{
2929
code: 'cy.get("new-todo").customPress("Enter").customScroll();',
30-
errors,
3130
options: [{ methods: ['customPress', 'customScroll'] }],
31+
errors,
3232
},
3333
],
3434
})

0 commit comments

Comments
 (0)