Skip to content

Commit

Permalink
fix(deps): update dependency eslint-compat-utils to ^0.3.0 (#186)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency eslint-compat-utils to ^0.3.0

* Create hungry-candles-bake.md

* Create lucky-bananas-roll.md

* format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
  • Loading branch information
renovate[bot] and ota-meshi committed Jan 16, 2024
1 parent 4c8d042 commit d69ac0b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-candles-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-toml": patch
---

fix(deps): update dependency eslint-compat-utils to ^0.3.0
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"dependencies": {
"debug": "^4.1.1",
"eslint-compat-utils": "^0.2.0",
"eslint-compat-utils": "^0.3.0",
"lodash": "^4.17.19",
"toml-eslint-parser": "^0.9.0"
},
Expand All @@ -75,8 +75,8 @@
"@types/mocha": "^10.0.0",
"@types/node": "^20.0.0",
"@types/semver": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"cross-env": "^7.0.2",
"env-cmd": "^10.1.0",
"esbuild": "^0.19.3",
Expand Down
4 changes: 2 additions & 2 deletions src/rules/array-bracket-newline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ export default createRule("array-bracket-newline", {
const elements = node.elements;
const normalizedOptions = normalizeOptions(context.options[0]);
const options = normalizedOptions[node.type];
const openBracket = sourceCode.getFirstToken(node)!;
const closeBracket = sourceCode.getLastToken(node)!;
const openBracket = sourceCode.getFirstToken(node);
const closeBracket = sourceCode.getLastToken(node);
const firstIncComment = sourceCode.getTokenAfter(openBracket, {
includeComments: true,
})!;
Expand Down
2 changes: 1 addition & 1 deletion src/rules/comma-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export default createRule("comma-style", {
* dangling comma.
*/
if (arrayLiteral) {
const lastToken = sourceCode.getLastToken(node)!;
const lastToken = sourceCode.getLastToken(node);
const nextToLastToken = sourceCode.getTokenBefore(lastToken)!;

if (isCommaToken(nextToLastToken)) {
Expand Down
14 changes: 7 additions & 7 deletions src/rules/indent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ export default createRule("indent", {
continue;
}
const elementTokens = {
firstToken: sourceCode.getFirstToken(node)!,
lastToken: sourceCode.getLastToken(node)!,
firstToken: sourceCode.getFirstToken(node),
lastToken: sourceCode.getLastToken(node),
};

// Collect comma/comment tokens between the last token of the previous node and the first token of this node.
Expand Down Expand Up @@ -249,7 +249,7 @@ export default createRule("indent", {
}
},
TOMLTable(node) {
const openBracket = sourceCode.getFirstToken(node)!;
const openBracket = sourceCode.getFirstToken(node);

// There can be no line breaks, but just in case, register the offset.
if (node.kind === "array") {
Expand Down Expand Up @@ -289,14 +289,14 @@ export default createRule("indent", {
// noop
},
TOMLArray(node) {
const openBracket = sourceCode.getFirstToken(node)!;
const closeBracket = sourceCode.getLastToken(node)!;
const openBracket = sourceCode.getFirstToken(node);
const closeBracket = sourceCode.getLastToken(node);
processNodeList(node.elements, openBracket, closeBracket, 1);
},
TOMLInlineTable(node) {
// There can be no line breaks, but just in case, register the offset.
const openBrace = sourceCode.getFirstToken(node)!;
const closeBrace = sourceCode.getLastToken(node)!;
const openBrace = sourceCode.getFirstToken(node);
const closeBrace = sourceCode.getLastToken(node);
processNodeList(node.body, openBrace, closeBrace, 1);
},
"Program:exit"(node) {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/inline-table-curly-spacing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default createRule("inline-table-curly-spacing", {
function checkForObject(node: AST.TOMLInlineTable) {
if (node.body.length === 0) return;

const first = sourceCode.getFirstToken(node)!;
const first = sourceCode.getFirstToken(node);
const last = getClosingBraceOfObject(node)!;
const second = sourceCode.getTokenAfter(first, {
includeComments: true,
Expand Down

0 comments on commit d69ac0b

Please sign in to comment.