From dd84b9d64fb98746a230cd24233ff50a562c39c9 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Apr 2023 01:36:44 +0800 Subject: --- packages/eslint-plugin-turbo/README.md | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 packages/eslint-plugin-turbo/README.md (limited to 'packages/eslint-plugin-turbo/README.md') diff --git a/packages/eslint-plugin-turbo/README.md b/packages/eslint-plugin-turbo/README.md new file mode 100644 index 0000000..83627a1 --- /dev/null +++ b/packages/eslint-plugin-turbo/README.md @@ -0,0 +1,53 @@ +# `eslint-plugin-turbo` + +Ease configuration for Turborepo + +## Installation + +1. You'll first need to install [ESLint](https://eslint.org/): + +```sh +npm install eslint --save-dev +``` + +2. Next, install `eslint-plugin-turbo`: + +```sh +npm install eslint-plugin-turbo --save-dev +``` + +## Usage + +Add `turbo` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: + +```json +{ + "plugins": ["turbo"] +} +``` + +Then configure the rules you want to use under the rules section. + +```json +{ + "rules": { + "turbo/no-undeclared-env-vars": "error" + } +} +``` + +### Example + +```json +{ + "plugins": ["turbo"], + "rules": { + "turbo/no-undeclared-env-vars": [ + "error", + { + "allowList": ["^ENV_[A-Z]+$"] + } + ] + } +} +``` -- cgit v1.2.3-70-g09d2