diff --git a/.eslintrc.js b/.eslintrc.js index c6bd5fed049..247379beb28 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,7 +15,13 @@ module.exports = { 'no-use-before-define': 'off', 'import/no-extraneous-dependencies': [ 'error', - { devDependencies: ['**/*.test.js', '**/*.spec.js', './scripts/**'] }, + { + devDependencies: [ + '**/*.test.js', + '**/*.spec.js', + '**/scripts/**', + ] + }, ], 'import/extensions': [ 'error', diff --git a/docs/scripts/writeVercelOutput.mjs b/docs/scripts/writeVercelOutput.mjs index b6ec20df8e7..87885d16606 100644 --- a/docs/scripts/writeVercelOutput.mjs +++ b/docs/scripts/writeVercelOutput.mjs @@ -1,6 +1,5 @@ import path from 'path'; import fs from 'fs'; -/* eslint-disable import/no-extraneous-dependencies */ import { getIconMetaData } from '@lucide/build-icons'; import { getCurrentDirPath } from '@lucide/helpers'; diff --git a/packages/lucide-static/scripts/buildLib.mjs b/packages/lucide-static/scripts/buildLib.mjs index 8f35c4b5e4d..a654be7e14d 100644 --- a/packages/lucide-static/scripts/buildLib.mjs +++ b/packages/lucide-static/scripts/buildLib.mjs @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import fs from 'fs'; import path from 'path'; import getArgumentOptions from 'minimist'; @@ -10,7 +9,7 @@ import generateSprite from './generateSprite.mjs'; import generateIconNodes from './generateIconNodes.mjs'; import copyIcons from './copyIcons.mjs'; -import pkg from '../package.json' assert { type: 'json' }; +import pkg from '../package.json' with { type: 'json' }; const cliArguments = getArgumentOptions(process.argv.slice(2)); const createDirectory = (dir) => { diff --git a/tools/build-icons/building/generateAliasesFile.mjs b/tools/build-icons/building/generateAliasesFile.mjs index ccb8f2c973f..2da0cb6b80c 100644 --- a/tools/build-icons/building/generateAliasesFile.mjs +++ b/tools/build-icons/building/generateAliasesFile.mjs @@ -8,7 +8,7 @@ const getImportString = ( iconName, aliasImportFileExtension, deprecated, - deprecationReason = '', + deprecationReason = '' ) => deprecated ? `export {\n` + @@ -100,7 +100,7 @@ export default async function generateAliasesFile({ exportFileIcon, aliasImportFileExtension, alias.deprecated, - deprecationReason, + deprecationReason ); if (!aliasNamesOnly) { @@ -109,7 +109,7 @@ export default async function generateAliasesFile({ exportFileIcon, aliasImportFileExtension, alias.deprecated, - deprecationReason, + deprecationReason ); importString += getImportString( @@ -117,7 +117,7 @@ export default async function generateAliasesFile({ exportFileIcon, aliasImportFileExtension, alias.deprecated, - deprecationReason, + deprecationReason ); } }) diff --git a/tools/build-icons/cli.mjs b/tools/build-icons/cli.mjs index 34009984756..3c1f60e376c 100755 --- a/tools/build-icons/cli.mjs +++ b/tools/build-icons/cli.mjs @@ -3,13 +3,13 @@ import fs from 'fs'; import path from 'path'; import getArgumentOptions from 'minimist'; -// eslint-disable-next-line import/no-extraneous-dependencies import { readSvgDirectory } from '@lucide/helpers'; import renderIconsObject from './render/renderIconsObject.mjs'; import generateIconFiles from './building/generateIconFiles.mjs'; import generateExportsFile from './building/generateExportsFile.mjs'; import generateAliasesFile from './building/generateAliasesFile.mjs'; +// eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member import getIconMetaData from './utils/getIconMetaData.mjs'; import generateDynamicImports from './building/generateDynamicImports.mjs'; diff --git a/tools/build-icons/utils/getIconMetaData.mjs b/tools/build-icons/utils/getIconMetaData.mjs index bddca575fa6..7c8c149caee 100644 --- a/tools/build-icons/utils/getIconMetaData.mjs +++ b/tools/build-icons/utils/getIconMetaData.mjs @@ -5,6 +5,7 @@ async function getIconMetaData(iconDirectory) { const iconJsons = readSvgDirectory(iconDirectory, '.json'); const aliasesEntries = await Promise.all( iconJsons.map(async (jsonFile) => { + /** eslint-disable */ const file = await import(path.join(iconDirectory, jsonFile), { assert: { type: 'json' } }); return [path.basename(jsonFile, '.json'), file.default]; }),