Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leocode/eslint-config
ESLint configs used in Leocode's projects.
https://github.com/leocode/eslint-config
Last synced: 10 days ago
JSON representation
ESLint configs used in Leocode's projects.
- Host: GitHub
- URL: https://github.com/leocode/eslint-config
- Owner: leocode
- License: mit
- Created: 2021-03-30T07:35:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-14T18:19:10.000Z (12 months ago)
- Last Synced: 2024-03-15T04:47:44.590Z (10 months ago)
- Language: JavaScript
- Size: 72.3 KB
- Stars: 2
- Watchers: 16
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LEOCODE's ESLint config
## Installation
1. Install all peer dependencies. You can use your favourite tool or just type:
```
For React:yarn add --dev eslint@8 @typescript-eslint/eslint-plugin@5 @typescript-eslint/parser@5 [email protected] [email protected] typescript@4
For Node:
yarn add --dev eslint@8 @typescript-eslint/eslint-plugin@5 @typescript-eslint/parser@5 typescript@4
```2. Install package with configuration:
```
yarn add --dev @leocode/eslint-config
```## Usage
For node put this in `.eslintrc.js` file:
```js
module.exports = {
extends: ['@leocode/eslint-config/node'],
};
```For React put this in `.eslintrc.js` file:
```js
module.exports = {
extends: ['@leocode/eslint-config/react'],
};
```## Known issues
If ESLint doesn't work by default in your editor (it cannot find `tsconfig.json` file), you may need to specify in `.eslintrc.js`:
```js
module.exports = {
extends: ['@leocode/eslint-config/node'],
parserOptions: {
tsconfigRootDir: __dirname, // or any other directory relative to `.eslintrc.js` file
},
};
```## License
MIT