feat: @nrwl/storybook: stories are not linted - it's on purpose or a bug?
See original GitHub issueExpected Behavior
I see two options how to approach this:
- use
tsconfig.json
as lint entry point within architect lint target
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "libs/react-one/.eslintrc",
"tsConfig": [
- "libs/react-one/tsconfig.lib.json",
- "libs/react-one/tsconfig.spec.json"
+ "libs/react-one/tsconfig.json"
],
"exclude": ["**/node_modules/**", "!libs/react-one/**"]
}
},
- generate
tsconfig.stories.json
whenstorybook:init
is executed and update particular project workspace.json accordingly
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "libs/react-one/.eslintrc",
"tsConfig": [
"libs/react-one/tsconfig.lib.json",
"libs/react-one/tsconfig.spec.json"
+ "libs/react-one/tsconfig.stories.json"
],
"exclude": ["**/node_modules/**", "!libs/react-one/**"]
}
},
with tsconfig.stories.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": [
"node"
]
},
"include": [
"**/*.stories.ts",
"**/*.stories.js"
]
}
Current Behavior
.stories
are not linted
Context
> NX Report complete - copy this into the issue template
@nrwl/angular : Not Found
@nrwl/cli : 9.2.3
@nrwl/cypress : 9.2.3
@nrwl/eslint-plugin-nx : 9.2.3
@nrwl/express : Not Found
@nrwl/jest : 9.2.3
@nrwl/linter : 9.2.3
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 9.2.3
@nrwl/react : 9.2.3
@nrwl/schematics : Not Found
@nrwl/tao : 9.2.3
@nrwl/web : 9.2.3
@nrwl/workspace : 9.2.3
typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
What is linting and how can it save you time? - freeCodeCamp
Simply put, a linter is a tool that programmatically scans your code with the goal of finding issues that can lead to bugs...
Read more >storybookjs/storybook (Raised $170.00) - Issuehunt
[Bug]: Angular function Input in component is not set from story args ... Storybook for Angular generates errors when component uses FontAwesome icons....
Read more >nrwl/storybook: Versions - Openbase
Full version history for @nrwl/storybook including change logs.
Read more >Some Serious Bugs - [Web Stories] Review - WordPress.org
Now recently this happened that the embedded story is not loading at all. There is a blank space at the embed location. Update:...
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
🤔 good question. I did a quick try by referencing the
.storybook/tsconfig
and it seemed to work. But guess you’ll have to give it a try and test some edge-cases to be 100% sure 😃cool 🎉. Just let me or @mandarini know if you have any doubts or questions.
Hey @Hotell 👋 . Just discussed the options with @mandarini. We would go with option 1, so
angular.json
/workspace.json
. But instead of generating a new one we could directly use the one in the.storybook/tsconfig.json
which is generated inside the lib that has storybook support.Would be cool if you could provide a PR on this 🙂