question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

magic numbers inside stylesheet

See original GitHub issue

Hello, 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:open
  • Created 7 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Intellicodecommented, Jun 30, 2016

@enapupe Actually, if you don’t mind sharing it I’m up for including it in the plugin.

0reactions
enapupecommented, Jun 30, 2016

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found