2.1.0 • Published 3 years ago
@blucass/eslint-config-react v2.1.0
eslint-config-react
A set of lint config rules for React project.
Installation
yarn add -D @blucass/eslint-config-react
# or
npm install -D @blucass/eslint-config-reactUsage
It's easy to integrate if you're using typescript. In your eslint config file, set extends:
module.exports = {
extends: ['@blucass/react']
}
# or
module.exports = require('@blucass/eslint-config-react')That's all!
Just for JS
NOTE:you must provide a babel config file such as
babel.config.jsin the root directory, since will not parse any experimental syntax when no configuration file is found. See more.
If you are just using js/jsx, what means you don't need typescript lint rules. The package also support it with @blucass/eslint-config-react/lib/eslint.
module.exports = {
extends: [require.resolve('@blucass/eslint-config-react/lib/eslint')]
}