Variants on Text cause issue with ESLint and cannot build project
See original GitHub issueDescription
When creating a custom theme for the Text component, I except to be able to have variants but I have ESLint error informing me that this is not possible
Link to Reproduction
https://codesandbox.io/s/nervous-alex-uow1k
Steps to reproduce
- Go to provided codesandbox demo
- Once the project is started go on
index.tsx
component - The variant is correctly applied to the
Text
Chakra UI Version
1.7.4
Browser
Brave 97
Operating System
- macOS
- Windows
- Linux
Additional Information
Variants on the Text
components causing an error when trying to build the project or deploying it on Vercel. The variants are correctly displayed on the screens (as showed in the codesandbox) but it’s not possible to build the project (using next build
).
The error is the following: `Type error: Type ‘string’ is not assignable to type ‘undefined’.``
It’s possible to fix the issue by using textStyles instead but this is not consistent with other components that all use variants (even the Heading
component support variants).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Show all warnings and errors in visual studio code
UPDATE 2019. ES-Lint has introduced a new task in VS Code. You have to enable it in the workspace setings. "eslint.lintTask.enable": true.
Read more >Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint-config-universe | Yarn - Package Manager
This is the log of notable changes to the Expo client that are developer-facing. Package-specific changes not released in any SDK will be...
Read more >Static Application Security Testing (SAST) - GitLab Docs
your project requires custom build configurations. you use language versions that aren't built into the analyzer. To resolve these issues, you can skip...
Read more >ESLint Custom Tooling at Scale - Medium
We use ESLint to ensure high code quality and to promote coding best practices, ... It is also used by many open source...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue lies in system.types.d.ts and the interface ThemingProps. A recent change has caused the issue. As a temporary fix, please revert back to @chakra-ui/react version 1.7.2.
v1.8.0
.