2.0.1 • Published 2 months ago
@tokopedia/eslint-config v2.0.1
@tokopedia/eslint-config
Shareable ESLint configuration for tokopedia web services.
@tokopedia/eslint-config is a shareable configuration package for eslint modified to meet tokopedia own standards.
Installation
$ pnpm add --save-dev eslint @tokopedia/eslint-config
Also, this config requires you to install basic peer dependencies
$ npm i --save-dev @babel/eslint-parser @lite-v3/eslint-plugin eslint-plugin-import eslint-plugin-jest@22 eslint-plugin-jest-dom eslint-plugin-json eslint-plugin-jsx-a11y eslint-plugin-prettier
Usage Overview
There are several ways to incorporate this eslint configuration into your project.
Step 1
Add this into your eslint configuration file
{
"extends": "@tokopedia/eslint-config"
}
Step 2 (Optional)
Select additional configurations. These require you to add dependencies to your project:
npm i --save-dev <additional deps>
.
Congiguration | Description | Additional Dependencies |
---|---|---|
@tokopedia/eslint-config/react | React and .jsx support | eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y |
@tokopedia/eslint-config/svelte | Svelte support | eslint-plugin-svelte3 |
@tokopedia/eslint-config/typescript | TypeScript support | @typescript-eslint/parser @typescript-eslint/eslint-plugin |
@tokopedia/eslint-config/pluggables | React and Pluggables support | eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y eslint-plugin-json |
@tokopedia/eslint-config/wpe-lite-theme | WPE Lite Theme custom ESLint | - |
NOTE: You must use a
.eslintrc
file to specify multiple configurations. Set the extends property to an array containing the Target Environment and one or more addon configurations.
2.0.1
2 months ago