eslint-config-emperor

1.4.0 • Public • Published

ESLint Config Emperor

Curated ESLint config for React and TypeScript.

NPM Version NPM Downloads License MIT Documentation


Installation

npm install --save-dev eslint-config-emperor
yarn add --save-dev eslint-config-emperor
pnpm add --save-dev eslint-config-emperor

Dependant plugins will be installed automatically. The list includes:

  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • eslint-config-prettier
  • eslint-plugin-import
  • eslint-plugin-jsx-a11y
  • eslint-plugin-prettier
  • eslint-plugin-react
  • eslint-plugin-react-hooks
  • eslint-plugin-unicorn

Usage

Entry points

Vanilla JS/TS

Rules reference:

module.exports = {
	// General error-catching rules. Lightweight code style rules are included as optional.
	extends: ['emperor', 'emperor/style'],
	// Add, if you are using TypeScript:
	parserOptions: {
		project: './tsconfig.json',
	},
	// Add, if you are using Node.js:
	env: {
		node: true,
	},
};

React

Rules reference:

module.exports = {
	// General error-catching rules. Already includes regular JS/TS rules.
	// Lightweight code style rules are included as optional.
	extends: ['emperor/react', 'emperor/react/style'],
	// Add, if you are using TypeScript:
	parserOptions: {
		project: './tsconfig.json',
	},
	// Add, if you are using Node.js:
	env: {
		node: true,
	},
};

Integrating with Next.js:

TODO

Integrating with Remix:

TODO

Prettier

Rules reference:

module.exports = {
	extends: ['emperor/prettier'],
};

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-config-emperor

Weekly Downloads

1

Version

1.4.0

License

MIT

Unpacked Size

16 kB

Total Files

14

Last publish

Collaborators

  • kubajastrz