Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/debitoor/eslint-config-debitoor
ESLint configuration for Debitoor
https://github.com/debitoor/eslint-config-debitoor
config debitoor eslint
Last synced: 12 days ago
JSON representation
ESLint configuration for Debitoor
- Host: GitHub
- URL: https://github.com/debitoor/eslint-config-debitoor
- Owner: debitoor
- Created: 2016-10-11T08:33:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T08:56:39.000Z (almost 3 years ago)
- Last Synced: 2024-10-02T11:15:49.434Z (about 2 months ago)
- Topics: config, debitoor, eslint
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@debitoor/eslint-config-debitoor
- Size: 102 KB
- Stars: 2
- Watchers: 19
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-config-debitoor
[![npm version](https://badge.fury.io/js/%40debitoor%2Feslint-config-debitoor.svg)](https://badge.fury.io/js/%40debitoor%2Feslint-config-debitoor)
[![Build Status](https://travis-ci.org/debitoor/eslint-config-debitoor.svg?branch=master)](https://travis-ci.org/debitoor/eslint-config-debitoor)Defines global linting rules for all debitoor projects
## Usage
``` bash
npm i -DE mocha-eslint @debitoor/eslint-config-debitoor
echo "require('mocha-eslint')(['.']);" > test/eslint.spec.js
echo "module.exports = {'extends': '@debitoor/eslint-config-debitoor'};" > .eslintrc.js
git add test/eslint.spec.js .eslintrc.js
```or add a ``.eslintrc.js`` file in the root of your project and extended it with the default config:
```js
module.exports = {
'extends': '@debitoor/eslint-config-debitoor'
};
```If you are using babel, you need to add `'parser': 'babel-eslint'` to `.eslintrc.js`:
```js
module.exports = {
extends: '@debitoor/eslint-config-debitoor',
parser: 'babel-eslint'
};
```### Add tests
Install mocha-eslint:
```bash
npm install -DE mocha-eslint
```and add a spec file `eslint.spec.js` in your test folder where you indicate which folders should be checked for linting:
```js
require('mocha-eslint')(['.']);
```
or
```js
require('mocha-eslint')([
'config',
'source',
'test'
]);
```### Fixing eslint errors automatically (if possible)
```bash
./node_modules/.bin/eslint . --fix
```