Skip to content

Commit

Permalink
feat: upgrade comments eslint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 30, 2024
1 parent ee047d2 commit a13a420
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"eslint": "^9.5.0"
},
"dependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
"@eslint/js": "^9.11.1",
"@eslint/markdown": "^6.1.1",
"@unocss/eslint-plugin": "^0.63.1",
"eslint-config-flat-gitignore": "^0.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-antfu": "^2.7.0",
"eslint-plugin-command": "^0.2.6",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import-x": "^4.3.1",
"eslint-plugin-jsdoc": "^50.3.0",
"eslint-plugin-jsonc": "^2.16.0",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

12 changes: 6 additions & 6 deletions src/configs/comments.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { pluginComments } from '../plugins'
import { configComments } from '../plugins'
import type { Linter } from 'eslint'

export const comments: Linter.Config[] = [
{
...configComments.recommended,
name: 'sxzz/comments/recommended',
},
{
name: 'sxzz/comments',
plugins: {
'eslint-comments': pluginComments,
},
rules: {
...pluginComments.configs.recommended.rules,
'eslint-comments/disable-enable-pair': [
'@eslint-community/eslint-comments/disable-enable-pair': [
'error',
{ allowWholeFile: true },
],
Expand Down
3 changes: 1 addition & 2 deletions src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import * as _pluginSxzz from 'eslint-plugin-sxzz'
export const pluginSxzz: typeof import('eslint-plugin-sxzz').default =
interopDefault(_pluginSxzz)

import * as _pluginComments from 'eslint-plugin-eslint-comments'
export const pluginComments: any = interopDefault(_pluginComments)
export { default as configComments } from '@eslint-community/eslint-plugin-eslint-comments/configs'

import * as _pluginMarkdown from '@eslint/markdown'
export const pluginMarkdown: any = interopDefault(_pluginMarkdown)
Expand Down

0 comments on commit a13a420

Please sign in to comment.