@preply-ds/eslint-config
v0.4.2
Published
> Lint configurations for this monorepo.
Downloads
5
Readme
@preply-ds/eslint-config
Lint configurations for this monorepo.
Using the Design System in your application or library?
Follow the instructions in @preply-ds/workspace.
Contributing
Reach out to #design-system-public if you think you can help and keep an eye on DS Confluence for more docs, guides, work in progress, decisions, the works.
Development
This package provides eslint
and prettier
configurations.
The naming convention for eslint plugins requires the package to be named per this convention: @namespace/eslint-config-****
.
Base configuration is airbnb-base, eslint, security, prettier
.
Note: Order matters: tyically airbnb
first (adds a lot of strict rules) and standards + prettier next (resets some sanity and makes sure prettier rules rule).
Overrides (based on file patterns):
- Typescript +
typescript
parser +airbnb, prettier (again), @typescript-eslint
- React +
airbnb/hooks + prettier/react + react + react-hooks + jsx-a11y
- Tests +
jest
- Docs + less strict
- MDX:
eslint-mdx
parser +typescript, react, mdx
WIP: plugin:@typescript-eslint/recommended-requiring-type-checking
later (and only for production code, not tests and stories)
Refer to Development section in @preply-ds/workspace for other lint/format related tools, namely how tsconfig.json
propagates through the repository, as this is an essential part of the eslint
+ typescript-eslint/parser
validation.
Dependencies
Only eslint
and prettier
are declared in the root package.json
.
Apart from those, all parsers, plugins, and extended configs are declared here as dependencies
.