Opinionated, auto-fixable rules to add on top of @masterworks/eslint-config-masterworks/base
.
Make sure to install these peer-dependencies:
npm install --save-dev @stylistic/eslint-plugin
yarn add --dev @stylistic/eslint-plugin
pnpm add --save-dev @stylistic/eslint-plugin
Import the preset in your eslint.config.js
file and extend it, after the base
preset:
import * as base from '@masterworks/eslint-config-masterworks/base/index.js'
import * as stylish from '@masterworks/eslint-config-masterworks/stylish/index.js'
export default [
{
ignores: [
// Files to ignore globally.
],
},
base.apply({
// ...
}),
stylish.apply({
// By default it includes all JavaScript files, buy you can customize it.
// Here we include TypeScript and JSX files as well.
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
// Here you can customize or disable rules.
},
}),
]