mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-25 14:14:57 +00:00
18 lines
479 B
Plaintext
18 lines
479 B
Plaintext
/**
|
|
* @name Component files with JSX
|
|
* @description Lists component TSX files that contain JSX (candidate for JSON conversion).
|
|
* @kind problem
|
|
* @severity warning
|
|
* @id custom/component-files-with-jsx
|
|
*/
|
|
import javascript
|
|
import semmle.javascript.JSX
|
|
|
|
predicate isComponentFile(File f) {
|
|
f.getRelativePath().regexpMatch("^(src/)?components/.*\\.tsx$")
|
|
}
|
|
|
|
from JsxElement jsx, File f
|
|
where f = jsx.getFile() and isComponentFile(f)
|
|
select f, "Component file contains JSX"
|