Skip to content

Commit

Permalink
docs: update peer dependencies installation doc
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanBerger98 committed Sep 9, 2024
1 parent 0f4c5b4 commit ba439ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ My default export contains most of my ESLint rules, including ECMAScript 6+, Typ
npx install-peerdeps --dev eslint-config-bryanberger
```

or

```sh
npm i -D eslint eslint-plugin-import @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
```

or with pnpm:

```sh
pnpm add -D eslint eslint-plugin-import @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
```

#### Extends config

Add `"extends": "bryanberger"` to your `.eslintrc` to extend the entire configuration.
Expand Down
5 changes: 3 additions & 2 deletions react.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-magic-numbers */
// eslint-disable-next-line @typescript-eslint/no-require-imports
const baseStyleRules = require('./javascript/style').rules;

const dangleRules = baseStyleRules[ 'no-underscore-dangle' ];
Expand Down Expand Up @@ -123,7 +124,7 @@ module.exports = {
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
'react/jsx-max-props-per-line': [ 'error', {
maximum: 1,
when: 'multiline',
when: 'always',
} ],

// Prevent usage of .bind() in JSX props
Expand Down Expand Up @@ -169,7 +170,7 @@ module.exports = {

// Enforce props alphabetical sorting
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
'react/jsx-sort-props': [ 'off', {
'react/jsx-sort-props': [ 'warn', {
ignoreCase: true,
callbacksLast: false,
shorthandFirst: false,
Expand Down

0 comments on commit ba439ee

Please sign in to comment.