https://github.com/fasttime/eslint-plugin-ebdd
https://github.com/fasttime/eslint-plugin-ebdd
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fasttime/eslint-plugin-ebdd
- Owner: fasttime
- License: isc
- Created: 2019-10-26T19:32:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T13:49:43.000Z (about 2 years ago)
- Last Synced: 2024-12-24T11:55:58.317Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# `eslint-plugin-ebdd` · [![npm version][npm badge]][npm url]
[ESLint](https://eslint.org/) environment for [Mocha](https://mochajs.org/)
[EBDD](https://github.com/fasttime/EBDD) interface.
## Installation
Install ESLint and `eslint-plugin-ebdd`:
```console
npm i --save-dev eslint eslint-plugin-ebdd
```
### Note
If you installed ESLint globally (using the `-g` flag) then you must also install plugins globally:
```console
npm i -g eslint-plugin-ebdd
```
## Usage
### Flat Config
Import `"eslint-plugin-ebdd"` in your `eslint.config.js` configuration file.
Use the `globals` export to define `languageOptions.globals` in your config.
```js
import { globals: ebddGlobals } from "eslint-plugin-ebdd";
export default [{ languageOptions: { globals: ebddGlobals } }];
```
### Legacy Config
Add `"ebdd"` to the plugins section of your `.eslintrc` configuration file.
You can omit the `eslint-plugin-` prefix.
Then configure the environment `ebdd/ebdd` under the `"env"` section.
```json
{
"plugins": [
"ebdd"
],
"env": {
"ebdd/ebdd": true
}
}
```
[npm badge]: https://badge.fury.io/js/eslint-plugin-ebdd.svg
[npm url]: https://www.npmjs.com/package/eslint-plugin-ebdd