-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds configuration to dependency-check command to check for unused dependencies properly in jsx & tsx files. BREAKING CHANGE: `.tsx` and `.jsx` files are now checked for missing/unused dependencies
- Loading branch information
Showing
11 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "jsx-dep-check-fail", | ||
"version": "1.0.0", | ||
"main": "index.jsx", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "18.3.1", | ||
"react-icons": "5.3.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @ts-expect-error - not installed | ||
// eslint-disable-next-line no-unused-vars | ||
import React from 'react' | ||
|
||
// @ts-expect-error - not installed | ||
// eslint-disable-next-line no-unused-vars | ||
const Component = () => (<div>Hello, world!</div>) | ||
const App = () => (<Component />) | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "jsx-dep-check-fail", | ||
"version": "1.0.0", | ||
"main": "index.jsx", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @ts-expect-error - not installed | ||
// eslint-disable-next-line no-unused-vars | ||
import React from 'react' | ||
|
||
// @ts-expect-error - not installed | ||
// eslint-disable-next-line no-unused-vars | ||
const Component = () => (<div>Hello, world!</div>) | ||
const App = () => (<Component />) | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "tsx-dep-check-fail", | ||
"version": "1.0.0", | ||
"main": "index.tsx", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "18.3.1", | ||
"react-icons": "5.3.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @ts-expect-error - not installed | ||
import React from 'react' | ||
|
||
// @ts-expect-error - not installed | ||
const Component: React.FC = () => (<div>Hello, world!</div>) | ||
const App: React.FC = () => (<Component />) | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "tsx-dep-check-pass", | ||
"version": "1.0.0", | ||
"main": "index.tsx", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @ts-expect-error - not installed | ||
import React from 'react' | ||
|
||
// @ts-expect-error - not installed | ||
const Component: React.FC = () => (<div>Hello, world!</div>) | ||
const App: React.FC = () => (<Component />) | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters