chore(deps): update dependency @antfu/eslint-config to ^0.40.0 (#552)

* chore(deps): update dependency @antfu/eslint-config to ^0.40.0

* chore(deps): updated eslint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
renovate[bot] 2023-08-21 18:27:08 +00:00 committed by GitHub
parent a2b9b157e5
commit 6ff9a01cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 349 additions and 409 deletions

View file

@ -85,7 +85,7 @@
"yaml": "^2.2.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.3",
"@antfu/eslint-config": "^0.40.2",
"@iconify-json/mdi": "^1.1.50",
"@intlify/unplugin-vue-i18n": "^0.12.0",
"@playwright/test": "^1.32.3",
@ -111,7 +111,7 @@
"@vue/tsconfig": "^0.1.3",
"c8": "^8.0.0",
"consola": "^3.0.2",
"eslint": "^8.38.0",
"eslint": "^8.47.0",
"jsdom": "^22.0.0",
"less": "^4.1.3",
"prettier": "^3.0.0",

718
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -92,7 +92,7 @@ const inputLabelAlignmentConfig = {
v-bind="inputLabelAlignmentConfig"
/>
<div divider my-16px />
<div my-16px divider />
<InputCopyable
v-for="format in formats"

View file

@ -82,7 +82,7 @@ const formats: DateFormat[] = [
{
name: 'Mongo ObjectID',
fromDate: date => `${Math.floor(date.getTime() / 1000).toString(16)}0000000000000000`,
toDate: objectId => new Date(parseInt(objectId.substring(0, 8), 16) * 1000),
toDate: objectId => new Date(Number.parseInt(objectId.substring(0, 8), 16) * 1000),
formatMatcher: date => isMongoObjectId(date),
},
];

View file

@ -29,7 +29,7 @@ const { copy } = useCopy();
Unicode: <span border="1px solid current op-30" b-rd-xl px-12px py-4px>{{ emojiInfo.unicode }}</span>
</div> -->
<div flex gap-2 font-mono text-xs op-70>
<div flex gap-2 text-xs font-mono op-70>
<span cursor-pointer transition hover:text-primary @click="copy(emojiInfo.codePoints, { notificationMessage: `Code points '${emojiInfo.codePoints}' copied to the clipboard` })">
{{ emojiInfo.codePoints }}
</span>

View file

@ -2,6 +2,6 @@ export function convertHexToBin(hex: string) {
return hex
.trim()
.split('')
.map(byte => parseInt(byte, 16).toString(2).padStart(4, '0'))
.map(byte => Number.parseInt(byte, 16).toString(2).padStart(4, '0'))
.join('');
}

View file

@ -23,7 +23,7 @@ function ipv4ToIpv6({ ip, prefix = '0000:0000:0000:0000:0000:ffff:' }: { ip: str
+ _.chain(ip)
.trim()
.split('.')
.map(part => parseInt(part).toString(16).padStart(2, '0'))
.map(part => Number.parseInt(part).toString(16).padStart(2, '0'))
.chunk(2)
.map(blocks => blocks.join(''))
.join(':')

View file

@ -13,7 +13,7 @@ function getRangesize(start: string, end: string) {
return -1;
}
return 1 + parseInt(end, 2) - parseInt(start, 2);
return 1 + Number.parseInt(end, 2) - Number.parseInt(start, 2);
}
function getCidr(start: string, end: string) {
@ -55,8 +55,8 @@ function calculateCidr({ startIp, endIp }: { startIp: string; endIp: string }) {
const cidr = getCidr(start, end);
if (cidr != null) {
const result: Ipv4RangeExpanderResult = {};
result.newEnd = bits2ip(parseInt(cidr.end, 2));
result.newStart = bits2ip(parseInt(cidr.start, 2));
result.newEnd = bits2ip(Number.parseInt(cidr.end, 2));
result.newStart = bits2ip(Number.parseInt(cidr.start, 2));
result.newCidr = `${result.newStart}/${cidr.mask}`;
result.newSize = getRangesize(cidr.start, cidr.end);

View file

@ -15,7 +15,7 @@ export {
};
function hexToBytes(hex: string) {
return (hex.match(/.{1,2}/g) ?? []).map(char => parseInt(char, 16));
return (hex.match(/.{1,2}/g) ?? []).map(char => Number.parseInt(char, 16));
}
function computeHMACSha1(message: string, key: string) {
@ -32,7 +32,7 @@ function base32toHex(base32: string) {
.map(value => base32Chars.indexOf(value).toString(2).padStart(5, '0'))
.join('');
const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => parseInt(chunk, 2).toString(16).padStart(2, '0')).join('');
const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => Number.parseInt(chunk, 2).toString(16).padStart(2, '0')).join('');
return hex;
}

View file

@ -4,7 +4,7 @@ export { getPasswordCrackTimeEstimation, getCharsetLength };
function prettifyExponentialNotation(exponentialNotation: number) {
const [base, exponent] = exponentialNotation.toString().split('e');
const baseAsNumber = parseFloat(base);
const baseAsNumber = Number.parseFloat(base);
const prettyBase = baseAsNumber % 1 === 0 ? baseAsNumber.toLocaleString() : baseAsNumber.toFixed(2);
return exponent ? `${prettyBase}e${exponent}` : prettyBase;
}

View file

@ -1,11 +1,17 @@
<script setup lang="ts">
import { useTheme } from './c-modal.theme';
defineOptions({
inheritAttrs: false,
});
const props = withDefaults(defineProps<{ open?: boolean; centered?: boolean }>(), {
open: false,
centered: true,
});
const emit = defineEmits(['update:open']);
const isOpen = useVModel(props, 'open', emit, { passive: true });
const { centered } = toRefs(props);
@ -29,10 +35,6 @@ defineExpose({
isOpen,
});
defineOptions({
inheritAttrs: false,
});
const theme = useTheme();
const modal = ref();

View file

@ -4,7 +4,7 @@ const clampHex = (value: number) => Math.max(0, Math.min(255, Math.round(value))
function lighten(color: string, amount: number): string {
const alpha = color.length === 9 ? color.slice(7) : '';
const num = parseInt(color.slice(1, 7), 16);
const num = Number.parseInt(color.slice(1, 7), 16);
const r = clampHex(((num >> 16) & 255) + amount);
const g = clampHex(((num >> 8) & 255) + amount);

View file

@ -7,5 +7,5 @@ export function formatBytes(bytes: number, decimals = 2) {
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return `${parseFloat((bytes / k ** i).toFixed(decimals))} ${sizes[i]}`;
return `${Number.parseFloat((bytes / k ** i).toFixed(decimals))} ${sizes[i]}`;
}