1.0.6 • Published 14 days ago

@r2d2bzh/eslint-config v1.0.6

Weekly downloads
4
License
ISC
Repository
github
Last release
14 days ago

:source-highlighter: highlightjs

= ESLINT-CONFIG

The r2d2bzh product stack is composed of multiple NodeJS micro-services. They need to be written with the same eslint rules thus the need to https://eslint.org/docs/developer-guide/shareable-configs[share these rules] in order to avoid developers to maintain them in each project.

== Current set of rules

The current set of rules provided by this shared configuration follows:

source,js

include::index.jstag=rules

== Install

You need to add the following NPM development dependency to the project that needs to be checked:

npm install --save-dev @r2d2bzh/eslint-config#<VERSION>

NOTE: Replace <VERSION> with a git tag of the https://github.com/r2d2bzh/eslint-config/releases[eslint-config repository].

This will add the package eslint-config in your repo.

In order to instruct eslint to apply these rules, you need to create an eslintrc.json file close to the package.json file:

.eslintrc.json

source,json

{ "extends": "@r2d2bzh"

}

WARNING: This package has peer dependencies that you need to install manually. This is to follow https://eslint.org/docs/developer-guide/shareable-configs#publishing-a-shareable-config[eslint recommendations].

== Ensuring linting

To ensure that the eslint rules are followed, the current recommendation is to add husky and lint-staged to the project:

npm install --save-dev husky lint-staged

.package.json

source,json

{ "eslint-staged": { "*.js": "eslint" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }

}

1.0.6

14 days ago

1.0.5

22 days ago

1.0.4

4 months ago

1.0.4-1

4 months ago

1.0.2

1 year ago

1.0.3

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.6.0-alpha.1

2 years ago

0.6.0-alpha.2

2 years ago

0.6.0-alpha.0

2 years ago

0.6.0-alpha.5

2 years ago

0.6.0-alpha.6

2 years ago

0.6.0-alpha.3

2 years ago

0.6.0-alpha.4

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.3

3 years ago

0.5.1

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.1.1

3 years ago

0.0.0

3 years ago