Skip to content

Commit 5a11e3c

Browse files
authored
Add support for flat config (#702)
1 parent eb3c724 commit 5a11e3c

File tree

84 files changed

+518
-384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+518
-384
lines changed

.changeset/honest-taxis-collect.md

Lines changed: 5 additions & 0 deletions

.eslint-doc-generatorrc.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/** @type {import('eslint-doc-generator').GenerateOptions} */
2-
const config = {
3-
configFormat: 'plugin-colon-prefix-name',
4-
ignoreConfig: ['all'],
2+
const config = {
3+
ignoreConfig: ['all', 'flat/all'],
4+
configEmoji: [
5+
["recommended", "🔵"],
6+
["flat/recommended", "🟢"],
7+
],
58
pathRuleList: ['README.md', 'docs/rules/index.md'],
69
ruleDocSectionInclude: ['Rule Details', 'Version', 'Implementation'],
710
ruleDocSectionOptions: false,

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
!/.vscode
1111
!/.github
1212
/tests/fixtures/integrations/eslint-plugin/test.js
13+
/tests/fixtures/integrations/eslint-plugin-legacy-config/test.js

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ module.exports = {
101101
"regexp/unicode-escape": "error",
102102
},
103103
overrides: [
104+
{
105+
files: ["*.mjs"],
106+
parserOptions: {
107+
sourceType: "module",
108+
},
109+
},
104110
{
105111
files: ["*.ts"],
106112
parser: "@typescript-eslint/parser",
@@ -127,6 +133,7 @@ module.exports = {
127133
rules: {
128134
"require-jsdoc": "off",
129135
"no-console": "off",
136+
"n/file-extension-in-import": "off",
130137
},
131138
},
132139
{

.github/workflows/NodeCI.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
# run: npm ci
3838
# We use `npm i` because there is an error regarding dependencies when installing eslint v9-alpha.
3939
run: npm i -f
40+
- name: Build
41+
run: npm run build
4042
- name: Test
4143
run: npm test
4244
test-and-coverage:
@@ -46,6 +48,8 @@ jobs:
4648
- uses: actions/setup-node@v4
4749
- name: Install Packages
4850
run: npm ci
51+
- name: Build
52+
run: npm run build
4953
- name: Test
5054
run: npm run test:nyc
5155
- name: Coveralls GitHub Action

README.md

Lines changed: 125 additions & 95 deletions

docs/rules/confusing-quantifier.md

Lines changed: 1 addition & 1 deletion

docs/rules/control-character-escape.md

Lines changed: 1 addition & 1 deletion

docs/rules/index.md

Lines changed: 90 additions & 89 deletions

docs/rules/match-any.md

Lines changed: 1 addition & 1 deletion

docs/rules/negation.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-contradiction-with-assertion.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-control-character.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-dupe-characters-character-class.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-dupe-disjunctions.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-empty-alternative.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-empty-capturing-group.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-empty-character-class.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-empty-group.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-empty-lookarounds-assertion.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-empty-string-literal.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-escape-backspace.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-extra-lookaround-assertions.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-invalid-regexp.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-invisible-character.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-lazy-ends.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-legacy-features.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-misleading-capturing-group.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-misleading-unicode-character.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-missing-g-flag.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-non-standard-flag.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-obscure-range.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-octal.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-optional-assertion.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-potentially-useless-backreference.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-super-linear-backtracking.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-trivially-nested-assertion.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-trivially-nested-quantifier.md

Lines changed: 1 addition & 1 deletion

docs/rules/no-unused-capturing-group.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-useless-assertions.md

Lines changed: 2 additions & 2 deletions

docs/rules/no-useless-backreference.md

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)