Update lint rule to ignore preview namespaces
This commit is contained in:
parent
ae46356bab
commit
0d138b71d1
|
@ -2,8 +2,11 @@
|
|||
|
||||
# quo components namespace ends with style|utils|types|reaction-resource
|
||||
# are not the component view, they are usually utils fns or styles
|
||||
#
|
||||
# We also ignore preview namespaces from this linter because they may require
|
||||
# ?schema vars to auto-generate preview descriptors.
|
||||
|
||||
if rg --pcre2 --glob '!src/quo/**/*' 'quo\.components(\.[\w-]+)*\.[\w-]*(?<!style|utils|types|reaction-resource)(\s|\]|\n)' src; then
|
||||
if rg --pcre2 --glob '!src/quo/**/*' --glob '!src/status_im/contexts/preview/quo/**/*' 'quo\.components(\.[\w-]+)*\.[\w-]*(?<!style|utils|types|reaction-resource)(\s|\]|\n)' src; then
|
||||
echo "Found above direct require of quo component outside src/quo/"
|
||||
echo "For more info, check the style guide https://github.com/status-im/status-mobile/blob/develop/doc/new-guidelines.md#requiring-quo-components"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue