https://github.com/aliatech/eslint-config-aliatech
ESLint shareable config for Node code style of ALIA Technologies
https://github.com/aliatech/eslint-config-aliatech
aliatech code-style es6 eslint hint lint quality
Last synced: about 2 months ago
JSON representation
ESLint shareable config for Node code style of ALIA Technologies
- Host: GitHub
- URL: https://github.com/aliatech/eslint-config-aliatech
- Owner: aliatech
- License: mit
- Created: 2019-03-07T00:00:43.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-10T21:06:08.000Z (almost 7 years ago)
- Last Synced: 2025-03-12T11:17:53.823Z (10 months ago)
- Topics: aliatech, code-style, es6, eslint, hint, lint, quality
- Language: JavaScript
- Size: 82 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-aliatech
[](https://travis-ci.org/aliatech/eslint-config-aliatech)
[](https://www.npmjs.com/package/@aliatech/eslint-config-aliatech)
> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for
[ALIA Technologies](http://alialabs.com "Go to ALIA Technologies' website") NodeJS code style (ES2015+ version)
## How to install
Install the package through NPM
```bash
npm i -D eslint @aliatech/eslint-config-aliatech
```
Install the package through Yarn
```bash
yarn add --prod eslint @aliatech/eslint-config-aliatech
```
## Usage
Once the `eslint-config-aliatech` package is installed, you can use it by specifying `aliatech/env-node`
in the [`extends`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) section
of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring).
```js
{
"extends": "@aliatech/aliatech/env-node",
"rules": {
// Additional, per-project rules...
}
}
```
Determine which environment you wish to target. This package includes the following ones:
| Target Environment | Description |
| :------------------- | :-------------------------------------------- |
| `aliatech` | General JavaScript (ES6, ES2016, and ES2017) |
| `aliatech/env-node` | Node.js support (extends `aliatech`) |
| `aliatech/env-mocha` | Mocha support (extends `aliatech`) |
### Extensions
This package also includes rules for the [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc).
If you want to lint jsdoc comments:
1. Install the plugin [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc)
2. Add `@aliatech/aliatech/add-jsdoc` to your `extends` key.
```bash
npm i -D eslint-plugin-jsdoc
```
```js
{
"extends": [
"@aliatech/aliatech/env-node",
"@aliatech/aliatech/add-jsdoc"
],
"rules": {
// Additional, per-project rules...
}
}
```
It's recommended that your project have a `.eslintignore` file in the root of your project. Add all
directories and file patterns you wish to ignore. At the the very least, you should ignore the
`node_modules` directory:
```
# .eslintignore
node_modules
```
## NPM Scripts
Add a `lint` and `test` scripts to the `package.json`.
```json
{
"scripts": {
"lint": "eslint --config aliatech/env-node src",
"test": "eslint --config aliatech/env-mocha test && mocha"
}
}
```
Then run:
```bash
npm run lint
```
# Testing
Install develop dependences
```bash
npm i -D # If you use NPM
yarn install # If you use Yarn
```
Execute tests
```bash
npm test
```
# Credits
Developed by
[Juan Costa](https://github.com/Akeri "Github's profile")
for [ALIA Technologies](https://github.com/aliatech "Github's profile")
[
](http://alialabs.com "Go to ALIA Technologies' website")