@nizaglobal/eslint-config
v0.0.3
Published
Niza Global ESLint config
Downloads
2
Readme
@nizaglobal/eslint-config
Niza Global ESLint config to enforce coding standards and best practices.
This is forked from @uniswap/eslint-config
- TypeScript and Jest support
- Seamless Prettier integration
- Separate environments for Node.js and React
Installation
It's already in the monorepo, just add to package.json devDependencies:
"@nizaglobal/eslint-config": "workspace:^"
Usage
For react-native based apps and packages:
module.exports = {
extends: ['@nizaglobal/eslint-config/native'],
}
For web-only apps:
Make sure to include require('@nizaglobal/eslint-config/load')
at the top of your ESLint config. This loads a @rushstack/eslint-patch/modern-module-resolution
patch so that ESLint loads any plugins installed by this package.
require('@nizaglobal/eslint-config/load')
module.exports = {
extends: '@nizaglobal/eslint-config/node'
}
or:
require('@nizaglobal/eslint-config/load')
module.exports = {
extends: '@nizaglobal/eslint-config/react'
}
VSCode
If you're a VSCode user, consider installing the official ESLint plugin and copying ./.vscode/settings.json
to your own .vscode/settings.json
configuration file. This will automatically run eslint --fix
on save.