From 1abc72d6e56215f966d9a795b22cf8081d6e1961 Mon Sep 17 00:00:00 2001 From: Adi Dahiya Date: Thu, 27 Feb 2020 14:14:02 -0500 Subject: [PATCH 1/3] [eslint-config] docs: add README --- packages/eslint-config/README.md | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 packages/eslint-config/README.md diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md new file mode 100644 index 0000000000..b5bed1470b --- /dev/null +++ b/packages/eslint-config/README.md @@ -0,0 +1,39 @@ + + +# [Blueprint](http://blueprintjs.com/) [ESLint](https://eslint.org/) Configuration + +Blueprint is a React UI toolkit for the web. + +This package contains the [ESLint](https://eslint.org/) configuration for Blueprint. It enables lint rules which enforce code style conventions and enables the `@blueprintjs/eslint-plugin-blueprint` plugin. + +## Installation + +``` +yarn add @blueprintjs/eslint-plugin-blueprint +``` + +## Usage + +Enable this configuration in your ESLint configuration file (e.g. `.eslintrc.json`): + +```json +{ + "extends": [ + "@blueprintjs/eslint-config" + ] +} +``` + +### Disabling rules with inline code comments + +This configuration runs TSLint rules through typescript-eslint, which means inline rule flags look a little different from [TSLint's rule flags](https://palantir.github.io/tslint/usage/rule-flags/). + +To disable a TSLint rule, follow the ESLint [documentation](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments) and insert code comments like this (substituing `` with the snake-case TSLint rule name): + +```ts +/* eslint-disable @typescript-eslint/tslint/ */ +... +/* eslint-enable @typescript-eslint/tslint/ */ + +/* eslint-disable @typescript-eslint/tslint/ */ +``` From 0861a2c369ebc63ad777aaef493241cf070b5137 Mon Sep 17 00:00:00 2001 From: Adi Dahiya Date: Thu, 27 Feb 2020 14:22:46 -0500 Subject: [PATCH 2/3] whoops --- packages/eslint-config/README.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index b5bed1470b..aedd118b1c 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -23,17 +23,3 @@ Enable this configuration in your ESLint configuration file (e.g. `.eslintrc.jso ] } ``` - -### Disabling rules with inline code comments - -This configuration runs TSLint rules through typescript-eslint, which means inline rule flags look a little different from [TSLint's rule flags](https://palantir.github.io/tslint/usage/rule-flags/). - -To disable a TSLint rule, follow the ESLint [documentation](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments) and insert code comments like this (substituing `` with the snake-case TSLint rule name): - -```ts -/* eslint-disable @typescript-eslint/tslint/ */ -... -/* eslint-enable @typescript-eslint/tslint/ */ - -/* eslint-disable @typescript-eslint/tslint/ */ -``` From e06b552fb07dfd5a329d0eeeb4b6c10cdcbe22aa Mon Sep 17 00:00:00 2001 From: Adi Dahiya Date: Thu, 27 Feb 2020 16:28:37 -0500 Subject: [PATCH 3/3] Update README.md --- packages/eslint-config/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index aedd118b1c..c0034d36c6 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -9,7 +9,7 @@ This package contains the [ESLint](https://eslint.org/) configuration for Bluepr ## Installation ``` -yarn add @blueprintjs/eslint-plugin-blueprint +yarn add @blueprintjs/eslint-config ``` ## Usage