@fly-lab/eslint-config

1.2.2 • Public • Published

@fly-lab ESLint & Prettier Rules

ESLint statically analyzes your code to quickly find problems. It is built into most text editors and you can run ESLint as part of your continuous integration pipeline.

This package is @rushstack/eslint-config based custom ESLint rules. It will remove most of the headache of configuring ESLint and prettier in every project.

@fly-lab ESLint & Prettier Rules

Installation

$ npm i -D @fly-lab/eslint-config
$ pnpm i -D @fly-lab/eslint-config
$ yarn add -D @fly-lab/eslint-config

Usages

ESLint

Usage is very easy. Just extend required profile in your .eslintrc file.

For example, extending in react project:

.eslintrc.js file in root directory:

module.exports = {
	root: true,
	extends: ["@fly-lab/eslint-config/react"],
	parserOptions: {
		tsconfigRootDir: __dirname,
	},
};

Prettier

Extending prettier is super easy. Just create .prettierrc file with content:

"@fly-lab/eslint-config/prettier-config.json"

Profile

Extending depends upon project:

  • React TypeScript: @fly-lab/eslint-config/react
  • React JavaScript: @fly-lab/eslint-config/react/js
  • Node TypeScript: @fly-lab/eslint-config/node
  • Node JavaScript: @fly-lab/eslint-config/node/js

ESLint ignoring

If we want to ignore specific file or folder to lint, use gitignore like syntax.

.eslintignore file:

node_modules
some_file.js
**/*html

Prettier ignoring

Just like ESLint ignoring:

.prettierignore file:

.github
dist
**/*.md
coverage

Package Sidebar

Install

npm i @fly-lab/eslint-config

Weekly Downloads

2

Version

1.2.2

License

MIT

Unpacked Size

8.44 kB

Total Files

9

Last publish

Collaborators

  • dhnchandan