@pinnacle0/eslint-plugin
v0.3.7
Published
This package provides customized eslint rules for Pinnacle and a baseline config for react/typescript projects.
Downloads
132
Readme
@pinnacle0/eslint-plugin
This package provides customized eslint rules for Pinnacle and a baseline config for react/typescript projects.
Usage
This package includes a config which wraps multiple other eslint plugins and presets.
For our config to work properly, @pinnacle0/eslint-plugin
has to be installed along with
all these plugins and presets ("peer dependencies").
Install @pinnacle0/eslint-plugin and the required peer dependencies:
$ pnpm install --dev \ @pinnacle/eslint-plugin \ eslint \ @typescript-eslint/parser \ @typescript-eslint/eslint-plugin \ eslint-config-prettier \ eslint-plugin-react \ eslint-plugin-react-hooks \ eslint-plugin-import \ eslint-plugin-eslint-comments
Create
.eslintrc.js
at the project root directory:module.exports = { extends: ["plugin:@pinnacle0/baseline"], };
Add
lint
script topackage.json
:{ // ... "scripts": { // ... "lint": "eslint --ext .js,.jsx,.ts,.tsx ." } }
Run linter:
$ pnpm lint
Upgrading
It is recommended to use the latest version of all packages.
To upgrade, run (use arrow keys and space to select packages):
$ pnpm up -iLr
Commit your changes:
$ git commit -am "Upgraded dependencies"
Review the changes of
pnpm-lock.yaml
if they make sense, then commit your changes:$ git commit -a --amend --no-edit