@fly-lab/eslint-config
v1.2.2
Published
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.
Downloads
3
Maintainers
Readme
@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.
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