0.0.3 • Published 4 years ago
eslint-config-unlrn v0.0.3
eslint-config-unlrn
- Install the configurations peer dependencies
npm
npx install-peerdeps --dev eslint-config-unlrn
yarn v1
npx install-peerdeps --dev --yarn eslint-config-unlrn
Optionally, you can install the peer dependencies manually
@babel/core @babel/eslint-parser eslint eslint-config-airbnb-base eslint-config-prettier eslint-plugin-fp eslint-plugin-html eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier
- Create a
.eslintrc.js
file in the root of your project or package
module.exports = {
"extends": ["unlrn"]
}
- Now add a script to your
package.json
to lint!
"scripts": {
"lint": "eslint ."
}
NOTE
If using yarn 2, you may run into issues with the eslint-plugin-import
. To solve this, you can add the below to the yarnrc.yml
packageExtensions:
eslint-module-utils@*:
dependencies:
eslint-import-resolver-node: "*"