Skip to content

Commit 207eb98

Browse files
authored
Update development dependencies (#2582)
1 parent 7502cf8 commit 207eb98

8 files changed

+45
-36
lines changed

eslint.config.js

+21-12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ module.exports = [
4242
}
4343
},
4444

45+
// turn off some rules from shared configs in all files
46+
{
47+
rules: {
48+
'eslint-plugin/require-meta-docs-recommended': 'off', // use `categories` instead
49+
'eslint-plugin/require-meta-schema-description': 'off',
50+
51+
'unicorn/filename-case': 'off',
52+
'unicorn/no-null': 'off',
53+
'unicorn/no-array-callback-reference': 'off', // doesn't work well with TypeScript's custom type guards
54+
'unicorn/no-useless-undefined': 'off',
55+
'unicorn/prefer-global-this': 'off',
56+
'unicorn/prefer-module': 'off',
57+
'unicorn/prefer-optional-catch-binding': 'off', // not supported by current ESLint parser version
58+
'unicorn/prefer-at': 'off', // turn off to prevent make breaking changes (ref: #2146)
59+
'unicorn/prefer-node-protocol': 'off', // turn off to prevent make breaking changes (ref: #2146)
60+
'unicorn/prefer-string-replace-all': 'off', // turn off to prevent make breaking changes (ref: #2146)
61+
'unicorn/prefer-top-level-await': 'off', // turn off to prevent make breaking changes (ref: #2146)
62+
'unicorn/prevent-abbreviations': 'off'
63+
}
64+
},
65+
4566
{
4667
files: ['**/*.js'],
4768
languageOptions: {
@@ -143,7 +164,6 @@ module.exports = [
143164
'error',
144165
{ pattern: '^(enforce|require|disallow).*[^.]$' }
145166
],
146-
'eslint-plugin/require-meta-docs-recommended': 'off', // use `categories` instead
147167
'eslint-plugin/require-meta-fixable': [
148168
'error',
149169
{ catchNoFixerButFixableProperty: true }
@@ -184,17 +204,6 @@ module.exports = [
184204
'error',
185205
{ checkArrowFunctions: false }
186206
],
187-
'unicorn/filename-case': 'off',
188-
'unicorn/no-null': 'off',
189-
'unicorn/no-array-callback-reference': 'off', // doesn't work well with TypeScript's custom type guards
190-
'unicorn/no-useless-undefined': 'off',
191-
'unicorn/prefer-optional-catch-binding': 'off', // not supported by current ESLint parser version
192-
'unicorn/prefer-module': 'off',
193-
'unicorn/prevent-abbreviations': 'off',
194-
'unicorn/prefer-at': 'off', // turn off to prevent make breaking changes (ref: #2146)
195-
'unicorn/prefer-node-protocol': 'off', // turn off to prevent make breaking changes (ref: #2146)
196-
'unicorn/prefer-string-replace-all': 'off', // turn off to prevent make breaking changes (ref: #2146)
197-
'unicorn/prefer-top-level-await': 'off', // turn off to prevent make breaking changes (ref: #2146)
198207

199208
'internal/require-eslint-community': ['error']
200209
}

lib/rules/define-macros-order.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function create(context) {
193193
const targetStatementIndex =
194194
moveTargetNodes.indexOf(targetStatement)
195195

196-
if (targetStatementIndex >= 0) {
196+
if (targetStatementIndex !== -1) {
197197
moveTargetNodes = moveTargetNodes.slice(0, targetStatementIndex)
198198
}
199199
reportNotOnTop(should.name, moveTargetNodes, targetStatement)

lib/rules/no-unused-refs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports = {
128128
}
129129
case 'CallExpression': {
130130
const argIndex = parent.arguments.indexOf(node)
131-
if (argIndex > -1) {
131+
if (argIndex !== -1) {
132132
// `foo($refs)`
133133
hasUnknown = true
134134
}

lib/utils/indent-common.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1531,20 +1531,20 @@ module.exports.defineVisitor = function create(
15311531
const tokens = tokenStore.getTokensBetween(importToken, node.source)
15321532
const fromIndex = tokens.map((t) => t.value).lastIndexOf('from')
15331533
const { fromToken, beforeTokens, afterTokens } =
1534-
fromIndex >= 0
1534+
fromIndex === -1
15351535
? {
1536+
fromToken: null,
1537+
beforeTokens: [...tokens, tokenStore.getFirstToken(node.source)],
1538+
afterTokens: []
1539+
}
1540+
: {
15361541
fromToken: tokens[fromIndex],
15371542
beforeTokens: tokens.slice(0, fromIndex),
15381543
afterTokens: [
15391544
...tokens.slice(fromIndex + 1),
15401545
tokenStore.getFirstToken(node.source)
15411546
]
15421547
}
1543-
: {
1544-
fromToken: null,
1545-
beforeTokens: [...tokens, tokenStore.getFirstToken(node.source)],
1546-
afterTokens: []
1547-
}
15481548

15491549
/** @type {ImportSpecifier[]} */
15501550
const namedSpecifiers = []
@@ -1556,7 +1556,7 @@ module.exports.defineVisitor = function create(
15561556
removeTokens.shift()
15571557
for (const token of removeTokens) {
15581558
const i = beforeTokens.indexOf(token)
1559-
if (i >= 0) {
1559+
if (i !== -1) {
15601560
beforeTokens.splice(i, 1)
15611561
}
15621562
}
@@ -1576,7 +1576,7 @@ module.exports.defineVisitor = function create(
15761576
rightBrace
15771577
]) {
15781578
const i = beforeTokens.indexOf(token)
1579-
if (i >= 0) {
1579+
if (i !== -1) {
15801580
beforeTokens.splice(i, 1)
15811581
}
15821582
}

lib/utils/indent-ts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ function defineVisitor({
663663
const [, ...removeTokens] = tokenStore.getTokens(child)
664664
for (const token of removeTokens) {
665665
const i = afterTokens.indexOf(token)
666-
if (i >= 0) {
666+
if (i !== -1) {
667667
afterTokens.splice(i, 1)
668668
}
669669
}

lib/utils/property-references.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function definePropertyReferenceExtractor(
343343
case 'CallExpression': {
344344
const argIndex = parent.arguments.indexOf(node)
345345
// `foo(arg)`
346-
return !withInTemplate && argIndex > -1
346+
return !withInTemplate && argIndex !== -1
347347
? extractFromCall(parent, argIndex)
348348
: NEVER
349349
}

lib/utils/selector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ function parseNth(pseudoNode) {
543543
.toLowerCase()
544544
const openParenIndex = argumentsText.indexOf('(')
545545
const closeParenIndex = argumentsText.lastIndexOf(')')
546-
if (openParenIndex < 0 || closeParenIndex < 0) {
546+
if (openParenIndex === -1 || closeParenIndex === -1) {
547547
throw new SelectorError(
548548
`Cannot parse An+B micro syntax (:nth-xxx() argument): ${argumentsText}.`
549549
)

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
},
6868
"devDependencies": {
6969
"@ota-meshi/site-kit-eslint-editor-vue": "^0.2.4",
70-
"@stylistic/eslint-plugin": "^2.6.0",
70+
"@stylistic/eslint-plugin": "^2.9.0",
7171
"@types/eslint": "^8.56.2",
72-
"@types/eslint-visitor-keys": "^3.3.0",
72+
"@types/eslint-visitor-keys": "^3.3.2",
7373
"@types/natural-compare": "^1.4.3",
7474
"@types/node": "^14.18.63",
7575
"@types/semver": "^7.5.8",
@@ -78,24 +78,24 @@
7878
"@typescript-eslint/types": "^7.18.0",
7979
"assert": "^2.1.0",
8080
"env-cmd": "^10.1.0",
81-
"esbuild": "^0.23.0",
81+
"esbuild": "^0.24.0",
8282
"eslint": "^8.57.0",
8383
"eslint-config-prettier": "^9.1.0",
84-
"eslint-plugin-eslint-plugin": "~6.2.0",
85-
"eslint-plugin-import": "^2.29.1",
84+
"eslint-plugin-eslint-plugin": "~6.3.1",
85+
"eslint-plugin-import": "^2.31.0",
8686
"eslint-plugin-jsonc": "^2.16.0",
8787
"eslint-plugin-node-dependencies": "^0.12.0",
8888
"eslint-plugin-prettier": "^5.2.1",
89-
"eslint-plugin-unicorn": "^55.0.0",
89+
"eslint-plugin-unicorn": "^56.0.0",
9090
"eslint-plugin-vue": "file:.",
9191
"espree": "^9.6.1",
9292
"events": "^3.3.0",
93-
"markdownlint-cli": "^0.41.0",
94-
"mocha": "^10.7.0",
95-
"nyc": "^17.0.0",
93+
"markdownlint-cli": "^0.42.0",
94+
"mocha": "^10.7.3",
95+
"nyc": "^17.1.0",
9696
"pathe": "^1.1.2",
9797
"prettier": "^3.3.3",
98-
"typescript": "^5.5.4",
99-
"vitepress": "^1.3.1"
98+
"typescript": "^5.6.3",
99+
"vitepress": "^1.4.1"
100100
}
101101
}

0 commit comments

Comments
 (0)