Closed thisismydesign closed 4 years ago
Let's also gitignore config.yml
if possible.
Let's also gitignore
config.yml
if possible.
https://github.com/c-hive/dotdev/pull/129/checks?check_run_id=645348012#step:6:12
You could ignore that rule for that import line.
Yep, that's right but I'd definitely leave a clarification comment on why it's required. I was trying to read up on this topic to find out if there's a best-practice to read and expose arbitrary data to (child) components in a more "nextjs-ish" manner (from the file system). For instance, getStaticProps()
is called at build-time to provide data to the pages ahead of the user requests (refer to the referenced chapter, there's a sample how they're using that method to read from the local file system). But I'd say it's just another method to read and expose data compared to our solution in which the file is imported directly in the context provider.
It'd be great btw not to ignore that rule locally.
Resolved by #129.
https://github.com/c-hive/dotdev/blob/f3a0c9b6b5593919943de869b3839cd8f71fab63/package.json#L7
https://github.com/c-hive/dotdev/blob/22b7ff34ed94a3a7666906247c8e0e6d1c61faca/src/contexts/Config.js#L3