18.2.19 • Published 4 months ago
@adaliszk/eslint-config-react v18.2.19
Typescript-based React ESLint Config
This package contains an eslint configuration that extends
my @adaliszk/eslint-config-typescript
settings and
adds typescript-based react linting.
Provides
@adaliszk/eslint-config-typescript
eslint-plugin-react
Rules
- Always use the shorthand for
React.Fragment
- Indent JSX with 4 spaces
- Allow up to depth of 4 with JSX elements
- Force self-closing when possible
- Use braces around JSX and HTML properties
Usage
- Install:
pnpm install -D @adaliszk/eslint-config-react eslint
- Add an
.eslintrc.yml
with the content of:
or to avoid clutter, put it into yourextends: - "@adaliszk/react"
package.json
:"eslintConfig": { "extends": [ "@adaliszk/react" ] }
- Hook up with a script:
"scripts": { "lint": "eslint source/** tests/**" }
Caveats
- When using node module based workspaces, you must include this package as a no-hoist so that eslint would find the configuration correctly.
Versioning
Since this is a meta-package, the versioning reflect its main provided package, in this case react
. However, only the
Major and Minor versions are kept in sync, and the Patch is used to bump the meta-package.
18.2.19
4 months ago
18.2.18
4 months ago
18.2.17
5 months ago
18.2.16
1 year ago
18.2.9
1 year ago
18.2.8
1 year ago
18.2.7
1 year ago
18.2.6
1 year ago
18.2.5
1 year ago
18.2.4
1 year ago
18.2.15
1 year ago
18.2.14
1 year ago
18.2.13
1 year ago
18.2.12
1 year ago
18.2.11
1 year ago
18.2.10
1 year ago
18.2.3
1 year ago
18.2.2
1 year ago
18.2.1
1 year ago