Skip to content

Commit 35a5cd0

Browse files
authored
chore: bupm eslint-plugin-comments (#702)
It now ships with flat configs
1 parent df123a5 commit 35a5cd0

File tree

3 files changed

+34
-45
lines changed

3 files changed

+34
-45
lines changed

eslint.config.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
const { configs: eslintConfigs } = require('@eslint/js');
22
const eslintPluginN = require('eslint-plugin-n');
3-
const eslintPluginEslintComments = require('@eslint-community/eslint-plugin-eslint-comments');
3+
const eslintPluginEslintCommentsConfigs = require('@eslint-community/eslint-plugin-eslint-comments/configs');
44
const eslintPluginEslintPluginRecommended = require('eslint-plugin-eslint-plugin/configs/recommended');
55
const eslintPluginMdx = require('eslint-plugin-mdx');
66
const eslintPluginPrettierRecommended = require('./recommended');
77

88
module.exports = [
99
eslintConfigs.recommended,
1010
eslintPluginN.configs['flat/recommended'],
11-
// eslint-community/eslint-comments does not expose a reusable flat config,
12-
// so create one from its legacy config
13-
{
14-
plugins: {
15-
'@eslint-community/eslint-comments': eslintPluginEslintComments,
16-
},
17-
rules: eslintPluginEslintComments.configs.recommended.rules,
18-
},
11+
eslintPluginEslintCommentsConfigs.recommended,
1912
eslintPluginEslintPluginRecommended,
2013
eslintPluginMdx.flat,
2114
eslintPluginMdx.flatCodeBlocks,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@changesets/changelog-github": "^0.5.0",
7272
"@changesets/cli": "^2.27.1",
7373
"@commitlint/config-conventional": "^18.4.3",
74-
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
74+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
7575
"@eslint/js": "^8.56.0",
7676
"@graphql-eslint/eslint-plugin": "^3.20.1",
7777
"@html-eslint/parser": "^0.24.1",

pnpm-lock.yaml

Lines changed: 31 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)