Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfennis committed Jun 21, 2024
1 parent 05762a4 commit 1c6262b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion docs/scripts/writeVercelOutput.mjs
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
3 changes: 1 addition & 2 deletions packages/lucide-static/scripts/buildLib.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
import fs from 'fs';
import path from 'path';
import getArgumentOptions from 'minimist';
Expand All @@ -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) => {
Expand Down
8 changes: 4 additions & 4 deletions tools/build-icons/building/generateAliasesFile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const getImportString = (
iconName,
aliasImportFileExtension,
deprecated,
deprecationReason = '',
deprecationReason = ''
) =>
deprecated
? `export {\n` +
Expand Down Expand Up @@ -100,7 +100,7 @@ export default async function generateAliasesFile({
exportFileIcon,
aliasImportFileExtension,
alias.deprecated,
deprecationReason,
deprecationReason
);

if (!aliasNamesOnly) {
Expand All @@ -109,15 +109,15 @@ export default async function generateAliasesFile({
exportFileIcon,
aliasImportFileExtension,
alias.deprecated,
deprecationReason,
deprecationReason
);

importString += getImportString(
`Lucide${componentNameAlias}`,
exportFileIcon,
aliasImportFileExtension,
alias.deprecated,
deprecationReason,
deprecationReason
);
}
})
Expand Down
2 changes: 1 addition & 1 deletion tools/build-icons/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 1 addition & 0 deletions tools/build-icons/utils/getIconMetaData.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}),
Expand Down

0 comments on commit 1c6262b

Please sign in to comment.