eslint-config-lion
🦁
The Lion preset @itsmelion reusable style guide.
Installation
- Install the correct versions of each package, which are listed by the command:
If using npm 5+, use this shortcut
npx install-peerdeps --dev eslint-config-lion
else:
npm info "eslint-config-lion@latest" peerDependencies
- Install the packages for your ruleset:
npm info "eslint-config-lion@latest" reactDependencies nodeDependencies typescriptDependencies
Usage
Add to your .eslintrc
:
{ "extends": "lion" }
Using "Create React App"?
- dont forget to extend
react-app
- and react extra dependencies:
eslint-plugin-flowtype
eslint-config-react-app
{ "extends": ["lion", "react-app"] }
Using React-Native?
- EXTRA:
eslint-import-resolver-alias
;
{ "extends": "lion/react-native" }
Using Typescript?
Install these two required dependencies:
@typescript-eslint/eslint-plugin
@typescript-eslint/parser
Web/JSX
{ "extends": "lion/typescript" }
Node
{ "extends": "lion/typescript-node" }
Using Node?
- dont forget to set:
type: "module"
|type: "commonjs"
on your package.json - REQUIRED:
eslint-plugin-node
;
{ "extends": "lion/node" }