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.

CSF linter / sanitizing loader

See original GitHub issue

CSF is based on ES modules, but Storybook’s source tooling, such as loaders and codemods assume certain things about those modules. We should write a linter or sanitizing loader to check for those things.

For example, most tools assume that there is a default export with a title:

export default {
  title: 'Foo/bar/baz'
  ...
}

The following code is equivalent at runtime:

const config = {
  title: 'Foo/bar/baz'
  ...
};

export default config;

However, because the source (AST) is different, many tools will ignore these files as poorly-formed CSF. We should write a checker to warn users when they don’t have well-formed CSF.

  • ESlint module that checks in your code editor
  • Babel/webpack loader that executes at load time

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Oct 24, 2022

@Sidnioulz I believe the default export must have either component OR title. Any chance you can make a PR to fix the docs?

1reaction
shilmancommented, Jul 21, 2021

@benbender yeah. this is in flux – I’ve created a shared library for CSF static analysis which fixes the example I gave above. We’ll update more tooling to use that, and we should also document its limitations. i suspect any documentation will happen in concert with the linter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Continuous, noninvasive wireless monitoring of flow ... - Nature
The natural intermittency of CSF flow through shunts confounds straightforward ... A liner-release layer with a custom laser-structured tab ...
Read more >
Artificial CSF Perfusion Fluid, Harvard Apparatus - VWR
This solution closely matches the electrolyte concentrations of CSF. Prepared from high purity water and analytical grade reagents; Microfiltered and sterile.
Read more >
Variables and category codes in Xactimate online - HelpDocs
Commercial and Residential Category Codes ; CPS CONT. Packing, handling, storage ; CUP CONT. Clean, upholstery & soft ; CWH CONT. Cleaning/Wall hangings...
Read more >
StormFilter - Stormwater Treatment from Contech
The Contech StormFilter removes pollutants such as fine solids, soluble heavy metals, oil, and total nutrients from stormwater runoff.
Read more >
US EPA, Pesticide Product Label, CDQ,09/08/2022
[Contains] Disinfecting cleaning with [soft] non-linting wipe ... Easy -or- Simple -or- Quick-to-load refill -or- roll -or- [disinfecting].
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