@aak.lear/eslint-config
Version:
This package simplifies the initial setup of eslint and prettier. It installs and apply eslint-config-airbnb to your project, also resolves peerDependencies that are required for eslint-config-airbnb package.
75 lines (58 loc) • 1.3 kB
Markdown
# @aak.lear/eslint-setup
## Install
### CLI
Run following command in your project root and select the desired options:
```shell
npx @aak.lear/eslint-config
```
### Manually
#### npm
```shell
npm i -D @aak.lear/eslint-config
```
#### yarn
```shell
yarn add -D @aak.lear/eslint-config
```
<br/>
For the correct work of configuration you should also install peer dependencies.
Run this command:
```shell
npx install-peerdeps --dev @aak.lear/eslint-config
```
<br/>
Or you can list all peer dependencies and install it manually:
```shell
npm info @aak.lear/eslint-config peerDependencies
```
Then install all dependencies from list with this template:
#### npm
```shell
npm i -D <dependency>@<version>
```
#### yarn
```shell
yarn add -D <dependency>@<version>
```
## Usage
_Note: You can skip this configuration step if you chose CLI installation._
Use this extension in your eslint configuration file.
Example for `.eslintrc.js`:
```javascript
module.exports = {
extends: [
'@aak-lear',
],
};
```
You can also use separate parts of config. But note that you should also install peer dependencies of preferred packages.
Example for `.eslintrc.js`:
```javascript
module.exports = {
extends: [
'@aak-lear/base',
'@aak-lear/typescript',
'@aak-lear/react',
],
};
```