Skip to content

Commit

Permalink
Enable noUnusedImports and noUnusedVariables in Biome
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Aug 14, 2024
1 parent 736f3f3 commit 4e2b02d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"complexity": {
"noUselessSwitchCase": "off"
},
"correctness": {
"noUnusedImports": "warn",
"noUnusedVariables": "warn"
},
"suspicious": {
"noConsoleLog": "warn"
}
Expand Down
2 changes: 1 addition & 1 deletion sample/create-react-app-5/src/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function Sample() {
</div>
<div className="Example__container__document" ref={setContainerRef}>
<Document file={file} onLoadSuccess={onDocumentLoadSuccess} options={options}>
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
Expand Down
2 changes: 1 addition & 1 deletion sample/next-app/app/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function Sample() {
</div>
<div className="Example__container__document" ref={setContainerRef}>
<Document file={file} onLoadSuccess={onDocumentLoadSuccess} options={options}>
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
Expand Down
2 changes: 1 addition & 1 deletion sample/next-pages/pages/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function Sample() {
</div>
<div className="Example__container__document" ref={setContainerRef}>
<Document file={file} onLoadSuccess={onDocumentLoadSuccess} options={options}>
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
Expand Down
2 changes: 1 addition & 1 deletion sample/parcel2/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function Sample() {
</div>
<div className="Example__container__document" ref={setContainerRef}>
<Document file={file} onLoadSuccess={onDocumentLoadSuccess} options={options}>
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
Expand Down
2 changes: 1 addition & 1 deletion sample/vite/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function Sample() {
</div>
<div className="Example__container__document" ref={setContainerRef}>
<Document file={file} onLoadSuccess={onDocumentLoadSuccess} options={options}>
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
Expand Down
2 changes: 1 addition & 1 deletion sample/webpack5/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function Sample() {
</div>
<div className="Example__container__document" ref={setContainerRef}>
<Document file={file} onLoadSuccess={onDocumentLoadSuccess} options={options}>
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
Expand Down
4 changes: 2 additions & 2 deletions test/Test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export default function Test() {
<div className="Test__container__content__document">
{render ? (
displayAll ? (
Array.from(new Array(numPages), (el, index) => (
Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
{...pageProps}
Expand Down Expand Up @@ -327,7 +327,7 @@ export default function Test() {
</div>
)}
<div className="Test__container__content__thumbnails">
{Array.from(new Array(numPages), (el, index) => (
{Array.from(new Array(numPages), (_el, index) => (
<Thumbnail
key={`thumbnail_${index + 1}`}
className="custom-classname-thumbnail"
Expand Down

0 comments on commit 4e2b02d

Please sign in to comment.