-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
no-debug
rule to cypress config, update eslint-plugin-cyp…
…ress to ~3.5.0 (#116) * fix(deps): update dependency eslint-plugin-cypress to ~3.5.0 * feat: Add no-debug to cypress --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bartosz <burtekdotryw@gmail.com>
- Loading branch information
1 parent
18f90e3
commit 0954aef
Showing
3 changed files
with
25 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
import cypress from 'eslint-plugin-cypress/flat'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
import { extendFlatConfig } from './share/extend-flat-config.js'; | ||
|
||
|
||
const files = ['**/*.cy.{js,cjs,mjs,jsx,ts,cts,mts,tsx}']; | ||
|
||
export function prepareConfig() { | ||
return tseslint.config( | ||
{ | ||
...cypress.configs.recommended, | ||
name: 'dtrw:cypress:base', | ||
files, | ||
rules: { | ||
...cypress.configs.recommended.rules, | ||
'cypress/assertion-before-screenshot': 'warn', | ||
'cypress/no-force': 'warn', | ||
'cypress/no-async-before': 'error', | ||
'cypress/no-pause': 'error', | ||
extendFlatConfig( | ||
cypress.configs.recommended, | ||
{ | ||
name: 'dtrw:cypress:base', | ||
files, | ||
rules: { | ||
'cypress/assertion-before-screenshot': 'warn', | ||
'cypress/no-force': 'warn', | ||
'cypress/no-async-before': 'error', | ||
'cypress/no-debug': 'error', | ||
'cypress/no-pause': 'error', | ||
|
||
// chai-friendly | ||
'no-unused-expressions': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'off' | ||
// eslint-disable-next-line no-warning-comments | ||
// TODO: fork of those above based on https://github.com/ihordiachenko/eslint-plugin-chai-friendly/blob/master/lib/rules/no-unused-expressions.js | ||
// chai-friendly | ||
'no-unused-expressions': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'off' | ||
// eslint-disable-next-line no-warning-comments | ||
// TODO: fork of those above based on https://github.com/ihordiachenko/eslint-plugin-chai-friendly/blob/master/lib/rules/no-unused-expressions.js | ||
} | ||
} | ||
} | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters