From 18a45cb79b51deccbf9352f04252d1462858159d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Goetz?= Date: Mon, 25 Dec 2023 09:16:39 +0100 Subject: [PATCH] docs(readme): add new `configType` option to readme --- README.md | 19 +++++++++++++++++++ src/options.json | 8 ++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f6c7af4..d01559f 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,25 @@ type cacheLocation = string; Specify the path to the cache location. Can be a file or a directory. +### `configType` + +- Type: + +```ts +type configType = "flat" | "eslintrc"; +``` + +- Default: `eslintrc` + +Specify the type of configuration to use with ESLint. +- `eslintrc` is the classic configuration format available in most ESLint versions. +- `flat` is the new format introduced in ESLint 8.21.0. + +The new configuration format is explained in its [own documentation](https://eslint.org/docs/latest/use/configure/configuration-files-new). + +> This configuration format being considered as experimental, it is not exported in the main ESLint module in ESLint 8. +> You need to set your `eslintPath` to `eslint/use-at-your-own-risk` for this config format to work. + ### `context` - Type: diff --git a/src/options.json b/src/options.json index 963044c..c25be41 100644 --- a/src/options.json +++ b/src/options.json @@ -2,6 +2,10 @@ "type": "object", "additionalProperties": true, "properties": { + "configType": { + "description": "Enable flat config by setting this value to `flat`.", + "type": "string" + }, "context": { "description": "A string indicating the root of your files.", "type": "string" @@ -58,10 +62,6 @@ "description": "Will process and report errors only and ignore warnings, if set to `true`.", "type": "boolean" }, - "configType": { - "description": "Enable flat config by setting this value to `flat`.", - "type": "string" - }, "outputReport": { "description": "Write the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI", "anyOf": [