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.
| 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'],
};💼 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 |
🌐 | 🔧 |