Skip to content

Commit 7e09518

Browse files
renovate[bot]ota-meshi
andauthoredJan 16, 2024
fix(deps): update dependency eslint-compat-utils to ^0.3.0 (#295)
* fix(deps): update dependency eslint-compat-utils to ^0.3.0 * Create hungry-worms-exist.md * Create afraid-points-impress.md * fix --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
1 parent 729424e commit 7e09518

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed
 

‎.changeset/hungry-worms-exist.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-yml": patch
3+
---
4+
5+
fix(deps): update dependency eslint-compat-utils to ^0.3.0

‎package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"homepage": "https://ota-meshi.github.io/eslint-plugin-yml/",
5858
"dependencies": {
5959
"debug": "^4.3.2",
60-
"eslint-compat-utils": "^0.2.1",
60+
"eslint-compat-utils": "^0.3.1",
6161
"lodash": "^4.17.21",
6262
"natural-compare": "^1.4.0",
6363
"yaml-eslint-parser": "^1.2.1"
@@ -80,8 +80,8 @@
8080
"@types/natural-compare": "^1.4.0",
8181
"@types/node": "^20.0.0",
8282
"@types/semver": "^7.3.1",
83-
"@typescript-eslint/eslint-plugin": "^6.0.0",
84-
"@typescript-eslint/parser": "^6.0.0",
83+
"@typescript-eslint/eslint-plugin": "^6.19.0",
84+
"@typescript-eslint/parser": "^6.19.0",
8585
"cross-env": "^7.0.2",
8686
"env-cmd": "^10.1.0",
8787
"esbuild": "^0.19.3",

‎src/rules/flow-mapping-curly-spacing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export default createRule("flow-mapping-curly-spacing", {
253253
function checkForObject(node: AST.YAMLMapping) {
254254
if (node.pairs.length === 0) return;
255255

256-
const first = sourceCode.getFirstToken(node)!;
256+
const first = sourceCode.getFirstToken(node);
257257
const last = getClosingBraceOfObject(node)!;
258258
const second = sourceCode.getTokenAfter(first, {
259259
includeComments: true,

‎src/rules/indent.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ export default createRule("indent", {
206206
continue;
207207
}
208208
const elementTokens = {
209-
firstToken: sourceCode.getFirstToken(node)!,
210-
lastToken: sourceCode.getLastToken(node)!,
209+
firstToken: sourceCode.getFirstToken(node),
210+
lastToken: sourceCode.getLastToken(node),
211211
};
212212

213213
// Collect comma/comment tokens between the last token of the previous node and the first token of this node.
@@ -321,7 +321,7 @@ export default createRule("indent", {
321321
// | a,
322322
// | b
323323
// | ]
324-
const open = sourceCode.getFirstToken(node)!;
324+
const open = sourceCode.getFirstToken(node);
325325
const close = sourceCode.getLastToken(node);
326326
processNodeList(node.entries, open, close, 1);
327327
} else if (node.style === "block") {
@@ -992,7 +992,7 @@ export default createRule("indent", {
992992
if (li?.indentBlockScalar) {
993993
const blockLiteral = li.indentBlockScalar.node;
994994
const diff = li.expectedIndent - li.actualIndent;
995-
const mark = sourceCode.getFirstToken(blockLiteral)!;
995+
const mark = sourceCode.getFirstToken(blockLiteral);
996996
const num = /\d+/u.exec(mark.value)?.[0];
997997
if (num != null) {
998998
const newIndent = Number(num) + diff;
@@ -1060,7 +1060,7 @@ export default createRule("indent", {
10601060
if (li.indentBlockScalar) {
10611061
const blockLiteral = li.indentBlockScalar.node;
10621062
const diff = li.expectedIndent - li.actualIndent;
1063-
const mark = sourceCode.getFirstToken(blockLiteral)!;
1063+
const mark = sourceCode.getFirstToken(blockLiteral);
10641064
yield fixer.replaceText(
10651065
mark,
10661066
mark.value.replace(/\d+/u, (num: string) => `${Number(num) + diff}`),

‎src/rules/sort-sequence-values.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class YAMLEntryData {
9999
const before =
100100
this.index > 0
101101
? this.sequence.entries[this.index - 1].aroundTokens.after
102-
: sourceCode.getFirstToken(this.sequence.node)!;
102+
: sourceCode.getFirstToken(this.sequence.node);
103103
const after = sourceCode.getTokenAfter(before)!;
104104
return (this.cachedAroundTokens = { before, after });
105105
}

0 commit comments

Comments
 (0)
Please sign in to comment.