eslint-config-aspira v1.1.6
eslint-config-aspira
We have two ESLint configurations for your usage.
base
The base config is for plain javascript projects (without react) such as lfm-local-server.
The base config includes eslint-config-airbnb-base and prettier rules.
typescript
The typescript config is for typescript projects.
This config requires knowledge of your TypeScript config.
In your ESLint config, set parserOptions.project to the path of your tsconfig.json.
For example:
{
extends: ['aspira/typescript'],
+ parserOptions: {
+ project: './tsconfig.json'
+ }
}
react
The react config is for react projects.
The react config includes base rule we defined, eslint-config-react-app and eslint-plugin-jsx-a11y/recommended rules.
next
The next config is for next projects.
react native
It depends on @react-native/eslint-config from Facebook at present. It can support js and ts at the same time.
For this package user, you can ignore above technical detail.
1. install the package
example:
yarn add @a1/eslint-config-aspira --save-dev
2. set .eslintrc.*
{
extends: ["aspira/react-native"],
}
Usage
Add one of configs to extends section of your .eslintrc.js
configuration file.
{
extends: ['aspira' or 'aspira/react']
}