Skip to content

Repository files navigation

eslint-plugin-e2ed

NPM version dependencies: none minzipped size code style: prettier Conventional Commits License MIT

ESLint plugin for e2ed.

Some rules are TypeScript-specific by nature (they check type annotations), so they are fully functional only with the @typescript-eslint/parser engine. The plugin does not require any particular parser: on the default parser such rules simply skip the checks of TypeScript-only syntax.

Configs

Name
🌐 all
recommended

The all config enables all rules of the plugin; the recommended config enables only the rules marked with ✅ in the rules table below. Both are flat configs:

// eslint.config.js
import e2ed from 'eslint-plugin-e2ed';

export default [...e2ed.configs.recommended];

In the legacy .eslintrc format, use the -legacy variants of these configs (recommended-legacy, all-legacy):

// .eslintrc.js
module.exports = {
  extends: ['plugin:e2ed/recommended-legacy'],
};

Rules

💼 Configurations enabled in.
🌐 Set in the all configuration.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.

Name                              Description 💼 🔧
no-await-in-expect-argument disallow await in the first argument of expect 🌐 ✅ 🔧
no-code-outside-test disallow top-level code outside the test call in test files 🌐 ✅ 🔧
require-definite-variable-in-test require definite assignment assertions and undefined-free types for uninitialized variables in the test body 🌐 🔧

License

MIT

About

ESLint plugin for e2ed

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages