@atixlabs/eslint-config
v1.2.3
Published
AtixLabs eslint rules for Node & ReactJS
Downloads
1,154
Readme
AtixLabs Eslint Config
This repository contains predefined (an opinionated) rules for AtixLabs eslint projects. Here you will be able to find presets for NodeJs and ReactJS (and obviously Javascript).
All the presets are based on other excellent projects with some minor tweaks to fit our needs. All our presets are defined using Eslint Shareable Configs
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
In order to setup the eslint rules in your project you need to use NodeJs v12+
. Also you need to install our rules presets:
npm install -E @atixlabs/eslint-config
Once you have installed the package, there is a helper script that will help installing the required dependencies based on the projec type you are trying to configure. To do so, invoke it using:
npx atixlabs-eslint-config-install-deps
or
./node_modules/.bin/atixlabs-eslint-config-install-deps
in case you don't have npx
installed.
Configuring
Depending on the project you are running you will need to specify which rules you want to use. To do so, create an .eslintrc
file with the following configs:
- NodeJS
{
"extends": "@atixlabs/eslint-config/configurations/node"
}
- ReactJS
{
"extends": "@atixlabs/eslint-config/configurations/react"
}
If your project contains multiple technologies, you can compose the configs, for example, if you have a NodeJs and React project, you can set:
{
"extends": [
"@atixlabs/eslint-config/configurations/react",
"@atixlabs/eslint-config/configurations/node"
]
}
Customization
- If you want to override any rule you an still do it by adding them in your project
.eslintrc
config file as you would normaly do.
How to test?
// TODO
Deployment
This package is published to npm registry under @atixlabs organization.
Built With
- Eslint - Linter Used.
- Prettier - For some presets related to our formatting rules.
- Formidable Labs presets - Used as a base for our config.
- Eslint Plugin Unicorn - With useful eslint rules.
- SonarJS - To detect bugs and suspicious patterns in the code.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License - see the LICENSE.md file for details