ESLint driver
Provides ESLint support by dynamically generating a
.eslintrc.js
config file.
#
Requirements- ESLint ^7.0.0
#
EventsCan be listened to on the ESLintDriver
instance.
Event | Arguments | Description |
---|---|---|
onCreateIgnoreFile | context: ConfigContext, path: Path, config: { ignore: string[] } | Called before the ignore file is written. |
#
InstallationIn your configuration module, install the driver, ESLint, and any plugins.
- Yarn
- NPM
Create a file at configs/eslint.ts
(or js
) in which to house your ESLint configuration.
#
IntegrationIn your consuming project, enable the driver by adding eslint
to your drivers
config.
#
Ignoring pathsInstead of using an .eslintignore
dotfile, you can define an ignore
property in your
configuration module's configs/eslint.ts
file, or a project's .config/beemo/eslint.ts
file. This
property accepts an array of strings. For example:
Becomes...
This feature follows the same configuration lifecycle as .eslintrc.js
, with the added benefit of
conditional logic, and being generated at runtime!