2.0.0 • Published 6 months ago
eslint-config-pk v2.0.0
eslint-config-pk
My eslint shareable config for common cases in JS
This version use new Eslint's flat config syntax. For older support, use v1.x instead.
Installation
npm i -D eslint eslint-config-pk
# or
yarn add -D eslint eslint-config-pk
# or
pnpm add -D eslint eslint-config-pk
Usage
This package already includes recommended eslint rules in all
config.
There're several configs: recommended, strict, stylistic and all of them. Most of the time, you should use all
config. However, you can extend a specific config as you need.
// eslint.config.js
import pk from 'eslint-config-pk';
export default [
...pk,
// other configs
]
CommonJS:
// eslint.config.cjs
const pk = require('eslint-config-pk');
module.exports = [
{
extends: [
...pk.all,
// other configs
],
},
];