Skip to content

Shareable eslint config to make it easier to use linting in fly-lab organization.

Notifications You must be signed in to change notification settings

fly-lab/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

Shareable eslint config to make it easier to use linting in fly-lab organization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published