Skip to content

Commit

Permalink
fix: Set lowest Node.js version to 16.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Feb 15, 2024
1 parent 27f6236 commit c8938e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rules/no-force-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ESTree from 'estree';
import { getStringValue, isBooleanLiteral } from '../utils/ast';

function isForceOptionEnabled(node: ESTree.CallExpression) {
const arg = node.arguments[node.arguments.length - 1];
const arg = node.arguments.at(-1);

return (
arg?.type === 'ObjectExpression' &&
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-restricted-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {
context.report({
data: { message: message ?? '', restriction },
loc: {
end: chain[chain.length - 1].loc!.end,
end: chain.at(-1)!.loc!.end,
start: chain[0].loc!.start,
},
messageId: message ? 'restrictedWithMessage' : 'restricted',
Expand Down
2 changes: 1 addition & 1 deletion src/rules/prefer-web-first-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default {
: [];

const methodEnd = methodArgs.length
? methodArgs[methodArgs.length - 1]!.range![1] + 1
? methodArgs.at(-1)!.range![1] + 1
: callee.property.range![1] + 2;

const fixes = [
Expand Down

0 comments on commit c8938e0

Please sign in to comment.