Skip to content

Commit 194ce25

Browse files
lukasviceCopilot
andauthored
eslint 9 (#31)
* update to eslint 9 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * update package-lock.json * remove custom eslint rules * make eslint automatic fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * make eslint manual fixes --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9f39452 commit 194ce25

7 files changed

Lines changed: 12034 additions & 4555 deletions

File tree

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import jest from '@aboutbits/eslint-config/configs/jest'
2+
import ts from '@aboutbits/eslint-config/configs/ts'
3+
import { defineConfig } from 'eslint/config'
4+
5+
export default defineConfig([
6+
ts,
7+
jest,
8+
{
9+
ignores: ['dist', 'node_modules'],
10+
},
11+
])

generator.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
/* eslint-disable no-console */
3+
14
const fs = require('fs')
25
const path = require('path')
36
const axios = require('axios')
@@ -28,8 +31,8 @@ const getIncludedFamilies = (unsupportedFamilies) => {
2831
const data = res.data.substring(4)
2932
const icons = await JSON.parse(data)
3033

31-
for (let i = 0; i < icons.icons.length; i++) {
32-
await generateComponentsForAllFamilies(icons.icons[i])
34+
for (const icon of icons.icons) {
35+
await generateComponentsForAllFamilies(icon)
3336
}
3437
})()
3538

@@ -47,10 +50,10 @@ function generatePropsFile() {
4750
async function generateComponentsForAllFamilies(icon) {
4851
const families = getIncludedFamilies(icon.unsupported_families)
4952

50-
for (let i = 0; i < families.length; i++) {
53+
for (const family of families) {
5154
await Promise.all([
52-
generateComponent(icon, families[i]),
53-
generateComponent(icon, families[i], true),
55+
generateComponent(icon, family),
56+
generateComponent(icon, family, true),
5457
])
5558
}
5659
}

0 commit comments

Comments
 (0)