1.1.1 • Published 19 days ago
@payloadcms/eslint-config v1.1.1
Payload CMS ESLint Config
An ESLint Config for Payload CMS projects.
Installation
$ npm i --save-dev @payloadcms/eslint-config
$ npm info @payloadcms/eslint-config peerDependencies
$ npm i --save-dev <dependency>@<version> # for each dependency in the above output
$ # or
$ yarn add --dev @payloadcms/eslint-config
$ yarn info @payloadcms/eslint-config peerDependencies
$ yarn add --dev <dependency>@<version> # for each dependency in the above output
Usage
There are a number of configurations for consumption, all of which are packaged together as the default export — or they can be selectively extended, which prevents the path names from being written shorthand.
{
"extends": "@payloadcms"
// or selectively extend any config(s)
// "extends": [
// "@payloadcms/eslint-config/configs/base",
// "@payloadcms/eslint-config/configs/jest",
// "@payloadcms/eslint-config/configs/react",
// ]
}
If using Webpack, install and configure eslint-loader
to have loaded files automatically linted.
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
fix: true,
emitWarning: true,
},
}
For working examples, see the demo app.
Demo
$ git clone git@github.com:payloadcms/eslint-config.git
$ yarn
$ yarn demo
$ open http://localhost:3000
Contribution
Help us, or let us help you help us.
License
MIT Copyright (c) Payload CMS
3.0.0-beta.16
19 days ago
1.1.1
4 months ago
1.1.0
4 months ago
1.0.0
7 months ago
0.0.2
10 months ago
0.0.3-beta.0
7 months ago
0.0.1
1 year ago