Socket
Socket
Sign inDemoInstall

eslint-plugin-cypress

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-cypress - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

37

.eslintrc.json
{
"env": {
"node": true,
"es6": true
},
"plugins": [
"@cypress/dev"
"eslint-plugin",
"n",
"mocha"
],
"extends": [
"plugin:@cypress/dev/general"
]
"eslint:recommended",
"plugin:eslint-plugin/recommended",
"plugin:n/recommended",
"plugin:mocha/recommended"
],
"rules": {
"eslint-plugin/require-meta-docs-url": [
"error",
{
"pattern": "https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/{{name}}.md"
}
],
"n/no-extraneous-require": [
"error",
{
"allowModules": [
"jest-config"
]
}
],
"no-redeclare": "off",
"mocha/no-mocha-arrows": "off",
"mocha/no-setup-in-describe": "off"
},
"parserOptions": {
"ecmaVersion": 2018
}
}

@@ -8,2 +8,3 @@ const globals = require('globals')

'no-unnecessary-waiting': require('./lib/rules/no-unnecessary-waiting'),
'no-async-before': require('./lib/rules/no-async-before'),
'no-async-tests': require('./lib/rules/no-async-tests'),

@@ -10,0 +11,0 @@ 'assertion-before-screenshot': require('./lib/rules/assertion-before-screenshot'),

@@ -19,2 +19,3 @@ 'use strict'

meta: {
type: 'problem',
docs: {

@@ -24,2 +25,3 @@ description: 'Assert on the page state before taking a screenshot, so the screenshot is consistent',

recommended: false,
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/assertion-before-screenshot.md',
},

@@ -26,0 +28,0 @@ schema: [],

3

lib/rules/no-assigning-return-values.js

@@ -20,2 +20,3 @@ 'use strict'

meta: {
type: 'problem',
docs: {

@@ -25,3 +26,3 @@ description: 'Prevent assigning return values of cy calls',

recommended: true,
url: 'https://on.cypress.io/best-practices#Assigning-Return-Values',
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-assigning-return-values.md',
},

@@ -28,0 +29,0 @@ schema: [],

@@ -5,2 +5,3 @@ 'use strict'

meta: {
type: 'problem',
docs: {

@@ -10,3 +11,5 @@ description: 'Prevent using async/await in Cypress before methods',

recommended: true,
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-before.md',
},
schema: [],
messages: {

@@ -13,0 +16,0 @@ unexpected: 'Avoid using async functions with Cypress before / beforeEach functions',

@@ -5,2 +5,3 @@ 'use strict'

meta: {
type: 'problem',
docs: {

@@ -10,3 +11,5 @@ description: 'Prevent using async/await in Cypress test cases',

recommended: true,
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-tests.md',
},
schema: [],
messages: {

@@ -13,0 +16,0 @@ unexpected: 'Avoid using async functions with Cypress tests',

@@ -9,2 +9,3 @@ 'use strict'

meta: {
type: 'suggestion',
docs: {

@@ -14,2 +15,3 @@ description: 'Disallow using of \'force: true\' option for click and type calls',

recommended: false,
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-force.md',
},

@@ -16,0 +18,0 @@ fixable: null, // or "code" or "whitespace"

@@ -9,2 +9,3 @@ 'use strict'

meta: {
type: 'suggestion',
docs: {

@@ -14,2 +15,3 @@ description: 'Disallow using of \'cy.pause\' calls',

recommended: false,
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-pause.md',
},

@@ -16,0 +18,0 @@ fixable: null, // or "code" or "whitespace"

@@ -5,2 +5,3 @@ 'use strict'

meta: {
type: 'problem',
docs: {

@@ -10,3 +11,3 @@ description: 'Prevent waiting for arbitrary time periods',

recommended: true,
url: 'https://on.cypress.io/best-practices#Unnecessary-Waiting',
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-unnecessary-waiting.md',
},

@@ -13,0 +14,0 @@ schema: [],

@@ -5,7 +5,8 @@ 'use strict'

meta: {
type: 'suggestion',
docs: {
description: 'Use data-* attributes to provide context to your selectors and insulate them from CSS or JS changes https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements',
description: 'Use data-* attributes to provide context to your selectors and insulate them from CSS or JS changes',
category: 'Possible Errors',
recommended: false,
url: 'https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements',
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/require-data-selectors.md',
},

@@ -12,0 +13,0 @@ schema: [],

@@ -72,2 +72,3 @@ 'use strict'

meta: {
type: 'problem',
docs: {

@@ -77,3 +78,3 @@ description: DESCRIPTION,

recommended: true,
url: 'https://docs.cypress.io/guides/core-concepts/retry-ability#Actions-should-be-at-the-end-of-chains-not-the-middle',
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/unsafe-to-chain-command.md',
},

@@ -80,0 +81,0 @@ schema: [schema],

{
"name": "eslint-plugin-cypress",
"version": "3.0.0",
"version": "3.0.1",
"description": "An ESLint plugin for projects using Cypress",

@@ -28,8 +28,6 @@ "main": "index.js",

"devDependencies": {
"@cypress/eslint-plugin-dev": "3.9.1",
"@cypress/eslint-plugin-json": "3.2.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"eslint-plugin-mocha": "^6.3.0",
"eslint": "^8.57.0",
"eslint-plugin-eslint-plugin": "^6.0.0",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-n": "^17.2.1",
"husky": "^8.0.3",

@@ -39,5 +37,2 @@ "jest": "^29.7.0",

},
"overrides": {
"eslint-plugin-mocha": "$eslint-plugin-mocha"
},
"scripts": {

@@ -44,0 +39,0 @@ "lint": "eslint \"*.js\" \"**/**/*.js\"",

@@ -18,3 +18,3 @@ 'use strict'

{ code: 'cy.tick(500)', parserOptions },
{ code: 'cy.get(\`[data-cy=${1}]\`)', parserOptions },
{ code: 'cy.get(\`[data-cy=${1}]\`)', parserOptions }, // eslint-disable-line no-useless-escape
{ code: 'cy.get("@my-alias")', parserOptions, errors },

@@ -30,4 +30,4 @@ { code: 'cy.get(`@my-alias`)', parserOptions, errors },

{ code: 'cy.get(".a")', parserOptions, errors },
{ code: 'cy.get(\`[daedta-cy=${1}]\`)', parserOptions, errors },
{ code: 'cy.get(\`[daedta-cy=${1}]\`)', parserOptions, errors }, // eslint-disable-line no-useless-escape
],
})

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc