Skip to content

Commit

Permalink
chore: bupm eslint-plugin-comments (#702)
Browse files Browse the repository at this point in the history
It now ships with flat configs
  • Loading branch information
BPScott authored Jan 18, 2025
1 parent df123a5 commit 35a5cd0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 45 deletions.
11 changes: 2 additions & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
const { configs: eslintConfigs } = require('@eslint/js');
const eslintPluginN = require('eslint-plugin-n');
const eslintPluginEslintComments = require('@eslint-community/eslint-plugin-eslint-comments');
const eslintPluginEslintCommentsConfigs = require('@eslint-community/eslint-plugin-eslint-comments/configs');
const eslintPluginEslintPluginRecommended = require('eslint-plugin-eslint-plugin/configs/recommended');
const eslintPluginMdx = require('eslint-plugin-mdx');
const eslintPluginPrettierRecommended = require('./recommended');

module.exports = [
eslintConfigs.recommended,
eslintPluginN.configs['flat/recommended'],
// eslint-community/eslint-comments does not expose a reusable flat config,
// so create one from its legacy config
{
plugins: {
'@eslint-community/eslint-comments': eslintPluginEslintComments,
},
rules: eslintPluginEslintComments.configs.recommended.rules,
},
eslintPluginEslintCommentsConfigs.recommended,
eslintPluginEslintPluginRecommended,
eslintPluginMdx.flat,
eslintPluginMdx.flatCodeBlocks,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@commitlint/config-conventional": "^18.4.3",
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
"@eslint/js": "^8.56.0",
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@html-eslint/parser": "^0.24.1",
Expand Down
66 changes: 31 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 35a5cd0

Please sign in to comment.