Skip to content

Commit 12a7cda

Browse files
authored
feat: export flat configs in configs object (#350)
1 parent 41bc731 commit 12a7cda

15 files changed

+146
-77
lines changed

.changeset/smooth-horses-greet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-import-x": minor
3+
---
4+
5+
Expose flat configs in `configs` object to allow use of ESLint `extends`

.eslint-doc-generatorrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ import prettierRC from './.prettierrc.js'
44

55
/** @type {import('eslint-doc-generator').GenerateOptions} */
66
const config = {
7+
configEmoji: [
8+
['recommended', '☑️'],
9+
['flat/errors', '❗'],
10+
['flat/recommended', '☑️'],
11+
['flat/typescript', '⌨️'],
12+
['flat/warnings', '🚸'],
13+
],
14+
ruleDocTitleFormat: 'prefix-name',
15+
ruleDocSectionOptions: false,
16+
ignoreConfig: ['stage-0', 'flat/stage-0'],
17+
ruleListSplit: 'meta.docs.category',
718
postprocess: content =>
819
format(content, { ...prettierRC, parser: 'markdown' }),
920
}

README.md

Lines changed: 71 additions & 47 deletions
Large diffs are not rendered by default.

docs/rules/default.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/default
22

3-
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
3+
💼 This rule is enabled in the following configs: ❗ `errors`, `flat/errors`, ☑️ `flat/recommended`, ☑️ `recommended`.
44

55
<!-- end auto-generated rule header -->
66

docs/rules/export.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/export
22

3-
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
3+
💼 This rule is enabled in the following configs: ❗ `errors`, `flat/errors`, ☑️ `flat/recommended`, ☑️ `recommended`.
44

55
<!-- end auto-generated rule header -->
66

docs/rules/named.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/named
22

3-
💼🚫 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. This rule is _disabled_ in the ⌨️ `typescript` config.
3+
💼🚫 This rule is enabled in the following configs: ❗ `errors`, `flat/errors`, ☑️ `flat/recommended`, ☑️ `recommended`. This rule is _disabled_ in the following configs: ⌨️ `flat/typescript`, ⌨️ `typescript`.
44

55
<!-- end auto-generated rule header -->
66

docs/rules/namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/namespace
22

3-
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
3+
💼 This rule is enabled in the following configs: ❗ `errors`, `flat/errors`, ☑️ `flat/recommended`, ☑️ `recommended`.
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-duplicates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/no-duplicates
22

3-
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
3+
⚠️ This rule _warns_ in the following configs: ☑️ `flat/recommended`, 🚸 `flat/warnings`, ☑️ `recommended`, 🚸 `warnings`.
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/no-named-as-default-member.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/no-named-as-default-member
22

3-
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
3+
⚠️ This rule _warns_ in the following configs: ☑️ `flat/recommended`, 🚸 `flat/warnings`, ☑️ `recommended`, 🚸 `warnings`.
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-named-as-default.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import-x/no-named-as-default
22

3-
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
3+
⚠️ This rule _warns_ in the following configs: ☑️ `flat/recommended`, 🚸 `flat/warnings`, ☑️ `recommended`, 🚸 `warnings`.
44

55
<!-- end auto-generated rule header -->
66

0 commit comments

Comments
 (0)