@craftworks/eslint-config-cypress
v2.0.1
Published
A ESLint config optimized for Cypress
Downloads
93
Readme
@craftworks/eslint-config-cypress
An ESLint config optimized for Cypress.
Contains the configs of
and applies a custom config.
Following configurations are provided
- @craftworks/eslint-config-cypress
- @craftworks/eslint-config-cypress/unsafe-typing Use on top of @craftworks/eslint-config-cypress; disables rules regarding
!
andany
which may be convenient for the developer if disabled, although they come with some degree of type safety reduction. - @craftworks/eslint-config-cypress/speed-up Use on top of @craftworks/eslint-config-cypress; disables some of the rules that run for relatively too long compared to the value they provide.
Installation
npm install @craftworks/eslint-config-cypress --save-dev
Check for necessary peer dependencies.
Usage
eslint.config.js
import eslintConfigCypress from '@craftworks/eslint-config-cypress';
export default [
...eslintConfigCypress,
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.lint.json'],
},
},
rules: {
// Optional rule overwrites
},
},
];
Create a tsconfig.lint.json
for your project that defines all the files that should be linted.
{
"extends": "./tsconfig.json",
"include": ["cypress"]
}
Note that only flat config is supported.
Peer Dependencies
eslint: ^9.0.0
@eslint/js: ^9.0.0
typescript: ^4.8.4 || ^5.0.0
typescript-eslint: ^8.0.0
The minimal node version is 18.18.0
.
See package.json for more details
Change Log
See CHANGELOG.md