eslint-config-vbg v1.0.0
ESLint Configuration for VBG's IT Projects
eslint-config-vbg: A formatting and linting package.
This package integrates various tools into a single eslint configuration for easy installation and setup, including:
- Airbnb ESLint Config
- Airbnb TypeScript ESLint Config
- TypeScript ESLint Plugin
- Prettier
- ESLint Config for Prettier
- ESLint Plugin for Import
Prerequisites
Before installing eslint-config-vbg
, ensure you have the following:
- TypeScript installed in your project.
- A
tsconfig.json
file in your project root. - Node.js (version 8 or later).
- npm (version 7 or later).
Installation
Note: If you aren't using npm version greater than 7, you will need to manually install these dependencies:
- eslint
- prettier
- @typescript-eslint/eslint-plugin
Refer to the peer dependencies object in the package.json to ensure correct versions.
Installation
If you aren't using npm version greater than 7 you will have to manually install these dependencies:
- eslint
- prettier
- @typescript-eslint/eslint-plugin
Copy everything inside the peer dependencies object here and paste it into your dev dependencies object. This will ensure you have the correct versions installed
Open your terminal.
Navigate to your project directory using the
cd
command.Once you're in the project directory, run the following command to install the
eslint-config-vbg
package:
npm install --save-dev eslint-config-vbg
After the package is installed, it will generate the eslint
and prettier
configs for your project automatically. Now, ESLint will use the eslint-config-vbg
configuration when linting your code.
- Create an
.eslintignore
in your project root
touch .eslintignore
- Paste the following into
.eslintignore
.eslintrc.js
node_modules/**
- Create an
.prettierignore
in your project root
touch .prettierignore
- Paste the following into
.prettierignore
node_modules/*
Customisation
This eslint config can be altered and extended by editing .eslintrc.json
Prettier can be altered and extended by creating and modifying .prettierrc