Skip to content

Commit eb035fe

Browse files
authored
Improve formatting (#1814)
* Ignore linting for examples in docs * Formatting JSX single attribute per line * Separte `format` and `lint:format` in package.json * Bump prettier version * Run format
1 parent b96e6ac commit eb035fe

1,520 files changed

Lines changed: 3651 additions & 3211 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ tests
66
node_modules
77
.eslintrc.js
88
docs/images
9-
docs/guide/basics/examples
10-
docs/guide/advanced/examples
9+
docs/**/examples/
1110
packages/lucide-react/dynamicIconImports.js

.eslintrc.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,15 @@ module.exports = {
4242
'@html-eslint/no-duplicate-attrs': 'error',
4343
'@html-eslint/no-inline-styles': 'error',
4444
'@html-eslint/require-attrs': [
45-
'error',
46-
...Object.entries(DEFAULT_ATTRS)
47-
.map(([attr, value]) => ({ tag: 'svg', attr, value: String(value) }))
45+
'error',
46+
...Object.entries(DEFAULT_ATTRS).map(([attr, value]) => ({
47+
tag: 'svg',
48+
attr,
49+
value: String(value),
50+
})),
4851
],
4952
'@html-eslint/indent': ['error', 2],
50-
"@html-eslint/no-multiple-empty-lines": ["error", { "max": 0 }],
53+
'@html-eslint/no-multiple-empty-lines': ['error', { max: 0 }],
5154
'@html-eslint/no-extra-spacing-attrs': [
5255
'error',
5356
{
@@ -64,7 +67,7 @@ module.exports = {
6467
'@html-eslint/element-newline': 'error',
6568
'@html-eslint/no-trailing-spaces': 'error',
6669
'@html-eslint/quotes': 'error',
67-
}
70+
},
6871
},
6972
],
7073
};

.github/actions/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: "Build and Test"
2-
description: "Builds and test a package"
1+
name: 'Build and Test'
2+
description: 'Builds and test a package'
33

44
inputs:
55
name:
66
description: “Name of the package”
77
required: true
88

99
runs:
10-
using: "composite"
10+
using: 'composite'
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4

.github/actions/check-icons.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: "Check icons"
2-
description: "Cross-checks icon and category references in JSON descriptors"
1+
name: 'Check icons'
2+
description: 'Cross-checks icon and category references in JSON descriptors'
33

44
inputs:
55
name:
66
description: “Name of the package”
77
required: true
88

99
runs:
10-
using: "composite"
10+
using: 'composite'
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4

.github/labeler.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,92 @@
11
# For changed dependencies
22
📦 dependencies:
3-
- changed-files:
4-
- any-glob-to-any-file:
5-
- pnpm-lock.yaml
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- pnpm-lock.yaml
66

77
# For changes in documentation
88
📖 documentation:
9-
- changed-files:
10-
- any-glob-to-any-file:
11-
- docs/*.md
12-
- docs/**/*.md
9+
- changed-files:
10+
- any-glob-to-any-file:
11+
- docs/*.md
12+
- docs/**/*.md
1313

1414
# For changes in the site, but not markdown files
1515
🌍 site:
16-
- changed-files:
17-
- any-glob-to-any-file:
18-
- 'docs/**'
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- 'docs/**'
1919

2020
# For changes in the metadata
2121
🫧 metadata:
22-
- changed-files:
23-
- any-glob-to-any-file:
24-
- 'icons/*.json'
25-
- categories/*
22+
- changed-files:
23+
- any-glob-to-any-file:
24+
- 'icons/*.json'
25+
- categories/*
2626

2727
# For changes or added icons
2828
🎨 icon:
29-
- changed-files:
30-
- any-glob-to-any-file:
31-
- 'icons/*.svg'
29+
- changed-files:
30+
- any-glob-to-any-file:
31+
- 'icons/*.svg'
3232

3333
# For changes in the lucide package
3434
🧳 lucide package:
35-
- changed-files:
36-
- any-glob-to-any-file:
37-
- 'packages/lucide/*'
35+
- changed-files:
36+
- any-glob-to-any-file:
37+
- 'packages/lucide/*'
3838

3939
# For changes in the lucide React package
4040
⚛️ react package:
41-
- changed-files:
42-
- any-glob-to-any-file:
43-
- 'packages/lucide-react/*'
41+
- changed-files:
42+
- any-glob-to-any-file:
43+
- 'packages/lucide-react/*'
4444

4545
# For changes in the lucide React Native package
4646
⚛️ react native package:
47-
- changed-files:
48-
- any-glob-to-any-file:
49-
- 'packages/lucide-react-native/*'
47+
- changed-files:
48+
- any-glob-to-any-file:
49+
- 'packages/lucide-react-native/*'
5050

5151
# For changes in the lucide vue packages
5252
💎 vue package:
53-
- changed-files:
54-
- any-glob-to-any-file:
55-
- 'packages/lucide-vue/*'
56-
- 'packages/lucide-vue-next/*'
53+
- changed-files:
54+
- any-glob-to-any-file:
55+
- 'packages/lucide-vue/*'
56+
- 'packages/lucide-vue-next/*'
5757

5858
# For changes in the lucide angular package
5959
🅰️ angular package:
60-
- changed-files:
61-
- any-glob-to-any-file:
62-
- 'packages/lucide-angular/*'
60+
- changed-files:
61+
- any-glob-to-any-file:
62+
- 'packages/lucide-angular/*'
6363

6464
# For changes in the lucide preact package
6565
⚛️ preact package:
66-
- changed-files:
67-
- any-glob-to-any-file:
68-
- 'packages/lucide-preact/*'
66+
- changed-files:
67+
- any-glob-to-any-file:
68+
- 'packages/lucide-preact/*'
6969

7070
# For changes in the lucide svelte package
7171
🧣 svelte package:
72-
- changed-files:
73-
- any-glob-to-any-file:
74-
- 'packages/lucide-svelte/*'
72+
- changed-files:
73+
- any-glob-to-any-file:
74+
- 'packages/lucide-svelte/*'
7575

7676
# For changes in the lucide solid package
7777
🪝 solid package:
78-
- changed-files:
79-
- any-glob-to-any-file:
80-
- 'packages/lucide-solid/*'
78+
- changed-files:
79+
- any-glob-to-any-file:
80+
- 'packages/lucide-solid/*'
8181

8282
# For changes in the lucide static package
8383
🪨 static package:
84-
- changed-files:
85-
- any-glob-to-any-file:
86-
- 'packages/lucide-static/*'
84+
- changed-files:
85+
- any-glob-to-any-file:
86+
- 'packages/lucide-static/*'
8787

8888
# For changes in the lucide flutter package
8989
🏹 flutter package:
90-
- changed-files:
91-
- any-glob-to-any-file:
92-
- 'packages/lucide-flutter/*'
90+
- changed-files:
91+
- any-glob-to-any-file:
92+
- 'packages/lucide-flutter/*'

.github/workflows/close-stale-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Close stale issues and PR
22
on:
33
schedule:
4-
- cron: "45 1 * * *"
4+
- cron: '45 1 * * *'
55

66
jobs:
77
stale:

.github/workflows/labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: "Pull Request Labeler"
1+
name: 'Pull Request Labeler'
22
on:
3-
- pull_request_target
3+
- pull_request_target
44

55
jobs:
66
triage:
@@ -9,4 +9,4 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@v5
12+
- uses: actions/labeler@v5

.github/workflows/lucide-font.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Create font in ./lucide-font
3030
run: pnpm build:font
3131

32-
- name: "Upload to Artifacts"
32+
- name: 'Upload to Artifacts'
3333
uses: actions/upload-artifact@v3
3434
with:
3535
name: lucide-font

.github/workflows/release.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,18 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
matrix:
44-
package: [
45-
'lucide',
46-
'lucide-react',
47-
'lucide-react-native',
48-
'lucide-vue',
49-
'lucide-vue-next',
50-
'lucide-angular',
51-
'lucide-preact',
52-
'lucide-solid',
53-
'lucide-svelte',
54-
]
44+
package:
45+
[
46+
'lucide',
47+
'lucide-react',
48+
'lucide-react-native',
49+
'lucide-vue',
50+
'lucide-vue-next',
51+
'lucide-angular',
52+
'lucide-preact',
53+
'lucide-solid',
54+
'lucide-svelte',
55+
]
5556
steps:
5657
- uses: actions/checkout@v4
5758
- uses: pnpm/action-setup@v2
@@ -136,7 +137,7 @@ jobs:
136137
- name: Create font in ./lucide-font
137138
run: pnpm build:font
138139

139-
- name: "Upload to Artifacts"
140+
- name: 'Upload to Artifacts'
140141
uses: actions/upload-artifact@v3
141142
with:
142143
name: lucide-font
@@ -145,10 +146,7 @@ jobs:
145146
post-release:
146147
if: github.repository == 'lucide-icons/lucide'
147148
runs-on: ubuntu-latest
148-
needs: [
149-
pre-release,
150-
lucide-font,
151-
]
149+
needs: [pre-release, lucide-font]
152150

153151
steps:
154152
- uses: actions/checkout@v4

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
pnpm-lock.yaml
22

3+
# docs examples
4+
docs/**/examples/
5+
36
# lucide-angular
47
packages/lucide-angular/.angular/cache
58

0 commit comments

Comments
 (0)