2.0.0 • Published 8 months ago

@autoguru/eslint-plugin v2.0.0

Weekly downloads
51
License
MIT
Repository
github
Last release
8 months ago

@autoguru/eslint-plugin

Usage

yarn add --dev @autoguru/eslint-plugin \
	eslint

Modern eslint requires the flat config format and the package exports config for use with eslint.config.m/js.

import { base, react, typescript } from '@autoguru/eslint-plugin/config';

/** @type {import('eslint').Linter.Config[]} */
export default [
	...base,
	...typescript,
	...react,
	{
		rules: {
			// custom rules as normal
		},
	},
];

Legacy eslint

For versions prior to 9, configure it by extending your package.json or .eslintrc.yml file:

extends:
    - 'plugin:@autoguru/base'
    - 'plugin:@autoguru/typescript' // if your project uses TypeScript (you can omit /base)
    - 'plugin:@autoguru/react' // react and react hook checks
    - 'plugin:@autoguru/jest' // jest, so we test better

If there are incompabitiblities with a version of eslint plugin coming from the @autoguru/eslint-plugin, you may need to pin an older version by using package file resolutions.