1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-11-26 01:00:27 +02:00

Bump xo to v0.59.3 (#11781)

This commit is contained in:
LitoMore 2024-09-17 09:46:48 +08:00 committed by GitHub
parent 099de86f12
commit 55b5a43a03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 10 deletions

View File

@ -34,7 +34,7 @@
"overrides": [ "overrides": [
{ {
"files": ["sdk.mjs", "sdk.d.ts"], "files": ["sdk.mjs", "sdk.d.ts"],
"nodeVersion": ">=14", "nodeVersion": ">=14.13.1",
"rules": { "rules": {
"eslint-comments/disable-enable-pair": "off", "eslint-comments/disable-enable-pair": "off",
"unicorn/no-abusive-eslint-disable": "off" "unicorn/no-abusive-eslint-disable": "off"

View File

@ -107,7 +107,7 @@
"svgo": "3.2.0", "svgo": "3.2.0",
"svgpath": "2.6.0", "svgpath": "2.6.0",
"typescript": "5.4.5", "typescript": "5.4.5",
"xo": "0.58.0" "xo": "0.59.3"
}, },
"scripts": { "scripts": {
"build": "node scripts/build/package.js", "build": "node scripts/build/package.js",

View File

@ -13,11 +13,14 @@ const __dirname = getDirnameFromImportMeta(import.meta.url);
const rootDirectory = path.resolve(__dirname, '..', '..'); const rootDirectory = path.resolve(__dirname, '..', '..');
const files = ['index.js', 'index.mjs', 'index.d.ts', 'sdk.js']; const files = ['index.js', 'index.mjs', 'index.d.ts', 'sdk.js'];
const fileExists = (fpath) => const fileExists = async (fpath) => {
fs try {
.access(fpath, fs.constants.F_OK) await fs.access(fpath);
.then(() => true) return true;
.catch(() => false); } catch {
return false;
}
};
try { try {
Promise.all( Promise.all(

View File

@ -11,7 +11,7 @@
import {promises as fs} from 'node:fs'; import {promises as fs} from 'node:fs';
import path from 'node:path'; import path from 'node:path';
import util from 'node:util'; import {format} from 'node:util';
import {transform as esbuildTransform} from 'esbuild'; import {transform as esbuildTransform} from 'esbuild';
import { import {
collator, collator,
@ -78,7 +78,7 @@ const licenseToObject = (license) => {
* @returns {string} The JavaScript object * @returns {string} The JavaScript object
*/ */
const iconToJsObject = (icon) => { const iconToJsObject = (icon) => {
return util.format( return format(
iconObjectTemplate, iconObjectTemplate,
escape(icon.title), escape(icon.title),
escape(icon.slug), escape(icon.slug),

2
sdk.d.ts vendored
View File

@ -2,7 +2,7 @@
* @file * @file
* Types for Simple Icons SDK. * Types for Simple Icons SDK.
*/ */
// eslint-disable-next-line n/file-extension-in-import
import type {CustomLicense, SPDXLicense} from './types'; import type {CustomLicense, SPDXLicense} from './types';
/** /**