magic numbers inside stylesheet
See original GitHub issueHello, I was wondering how to properly setup this plugin in order I stop getting warnings like 9:15 warning No magic number: 20 no-magic-numbers
within styles block such as:
const styles = StyleSheet.create({
container: {
flex: 1
, justifyContent: 'center'
, alignItems: 'center'
, backgroundColor: '#F5FCFF'
}
, welcome: {
fontSize: 20
, textAlign: 'center'
, margin: 10
}
, instructions: {
textAlign: 'center'
, color: '#333333'
, marginBottom: 5
}
})
This plugin offers any solution to this matter?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Magic Numbers in CSS: How to Identify and Fight Them
Learn how to identify magic numbers in CSS design systems and about different strategies to avoid magic numbers.
Read more >Magic Numbers in CSS - Nick Gard - Medium
First, let's clarify what exactly a magic number is. A magic number is a measurement without context. It is a number whose reason...
Read more >Magic Numbers in CSS - JavaScript Code Readability
Magic numbers are numbers that appear in source code without any explanation of what they mean. This makes the code difficult to understand...
Read more >Magic numbers in css - Sam Dawson
A magic number is a number or value in code that does not have an explicit meaning. ... In CSS maybe we don't...
Read more >Mastering CSS: Magic Numbers - DEV Community
Due to the hacky nature of CSS and varying browser support, sometimes the only solution is to use Magic Numbers. Even in that...
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 Free
Top 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
@enapupe Actually, if you don’t mind sharing it I’m up for including it in the plugin.
I wouldn’t mind sharing, but right now I already have too much new software to study, so, I’m not gonna do this anytime soon…