Update dependency eslint to v9 (#4996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: cairo <cairoeth@protonmail.com>
This commit is contained in:
@ -8,7 +8,7 @@ const format = require('./format-lines');
|
||||
function getVersion(path) {
|
||||
try {
|
||||
return fs.readFileSync(path, 'utf8').match(/\/\/ OpenZeppelin Contracts \(last updated v[^)]+\)/)[0];
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +227,6 @@ function _unsafeAccess(
|
||||
}
|
||||
}
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
// GENERATE
|
||||
module.exports = format(
|
||||
|
||||
@ -11,7 +11,6 @@ import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";
|
||||
import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol";
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const template = opts => `\
|
||||
using Checkpoints for Checkpoints.${opts.historyTypeName};
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ const format = require('../format-lines');
|
||||
const { fromBytes32, toBytes32 } = require('./conversion');
|
||||
const { TYPES } = require('./EnumerableMap.opts');
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const header = `\
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
@ -52,7 +51,6 @@ import {EnumerableSet} from "./EnumerableSet.sol";
|
||||
* ====
|
||||
*/
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const defaultMap = `\
|
||||
// To implement this library for multiple types with as little code repetition as possible, we write it in
|
||||
|
||||
@ -2,7 +2,6 @@ const format = require('../format-lines');
|
||||
const { fromBytes32, toBytes32 } = require('./conversion');
|
||||
const { TYPES } = require('./EnumerableSet.opts');
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const header = `\
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
@ -41,7 +40,6 @@ pragma solidity ^0.8.20;
|
||||
* ====
|
||||
*/
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const defaultSet = `\
|
||||
// To implement this library for multiple types with as little code
|
||||
|
||||
@ -43,7 +43,6 @@ const errors = `\
|
||||
error MerkleProofInvalidMultiproof();
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const templateProof = ({ suffix, location, visibility, hash }) => `\
|
||||
/**
|
||||
* @dev Returns true if a \`leaf\` can be proved to be a part of a Merkle tree
|
||||
@ -172,7 +171,6 @@ function processMultiProof${suffix}(${formatArgsMultiline(
|
||||
}
|
||||
}
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
// GENERATE
|
||||
module.exports = format(
|
||||
|
||||
@ -61,7 +61,6 @@ function toUint${length}(uint256 value) internal pure returns (uint${length}) {
|
||||
}
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const toIntDownCast = length => `\
|
||||
/**
|
||||
* @dev Returns the downcasted int${length} from int256, reverting on
|
||||
@ -81,7 +80,6 @@ function toInt${length}(int256 value) internal pure returns (int${length} downca
|
||||
}
|
||||
}
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const toInt = length => `\
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user