From 13e5f66b02e6d23ce9208466fbad2209110f4ea5 Mon Sep 17 00:00:00 2001 From: Steve Dodier-Lazaro Date: Fri, 3 Oct 2025 14:15:21 +0200 Subject: [PATCH 01/14] Ensure prettier passes on code --- code/.prettierignore | 5 ++- code/frameworks/angular/build-schema.json | 32 ++++--------------- code/frameworks/angular/start-schema.json | 32 ++++--------------- .../template/cli/page.stories.yaml | 10 +++--- code/frameworks/sveltekit/tsconfig.json | 2 +- .../eslint-plugin/docs/rules/no-stories-of.md | 1 - 6 files changed, 24 insertions(+), 58 deletions(-) diff --git a/code/.prettierignore b/code/.prettierignore index a66b6e6cf489..837d44fc9c8a 100644 --- a/code/.prettierignore +++ b/code/.prettierignore @@ -7,4 +7,7 @@ bench /.nx/cache core/report -/.nx/workspace-data \ No newline at end of file +/.nx/workspace-data + +# This file contains imports with an order that must be preserved. +core/src/core-server/presets/common-manager.ts \ No newline at end of file diff --git a/code/frameworks/angular/build-schema.json b/code/frameworks/angular/build-schema.json index 12e9e2af7ebe..9753db540f2d 100644 --- a/code/frameworks/angular/build-schema.json +++ b/code/frameworks/angular/build-schema.json @@ -67,27 +67,18 @@ "compodocArgs": { "type": "array", "description": "Compodoc options : https://compodoc.app/guides/options.html. Options `-p` with tsconfig path and `-d` with workspace root is always given.", - "default": [ - "-e", - "json" - ], + "default": ["-e", "json"], "items": { "type": "string" } }, "webpackStatsJson": { - "type": [ - "boolean", - "string" - ], + "type": ["boolean", "string"], "description": "Write Webpack Stats JSON to disk", "default": false }, "statsJson": { - "type": [ - "boolean", - "string" - ], + "type": ["boolean", "string"], "description": "Write stats JSON to disk", "default": false }, @@ -125,10 +116,7 @@ } }, "sourceMap": { - "type": [ - "boolean", - "object" - ], + "type": ["boolean", "object"], "description": "Configure sourcemaps. See: https://angular.io/guide/workspace-config#source-map-configuration", "default": false }, @@ -170,11 +158,7 @@ } }, "additionalProperties": false, - "required": [ - "glob", - "input", - "output" - ] + "required": ["glob", "input", "output"] }, { "type": "string" @@ -202,9 +186,7 @@ } }, "additionalProperties": false, - "required": [ - "input" - ] + "required": ["input"] }, { "type": "string", @@ -213,4 +195,4 @@ ] } } -} \ No newline at end of file +} diff --git a/code/frameworks/angular/start-schema.json b/code/frameworks/angular/start-schema.json index 7befb6f8b727..84d6bd80861b 100644 --- a/code/frameworks/angular/start-schema.json +++ b/code/frameworks/angular/start-schema.json @@ -93,10 +93,7 @@ "compodocArgs": { "type": "array", "description": "Compodoc options : https://compodoc.app/guides/options.html. Options `-p` with tsconfig path and `-d` with workspace root is always given.", - "default": [ - "-e", - "json" - ], + "default": ["-e", "json"], "items": { "type": "string" } @@ -135,18 +132,12 @@ "description": "URL path to be appended when visiting Storybook for the first time" }, "webpackStatsJson": { - "type": [ - "boolean", - "string" - ], + "type": ["boolean", "string"], "description": "Write Webpack Stats JSON to disk", "default": false }, "statsJson": { - "type": [ - "boolean", - "string" - ], + "type": ["boolean", "string"], "description": "Write stats JSON to disk", "default": false }, @@ -160,10 +151,7 @@ "pattern": "(silly|verbose|info|warn|silent)" }, "sourceMap": { - "type": [ - "boolean", - "object" - ], + "type": ["boolean", "object"], "description": "Configure sourcemaps. See: https://angular.io/guide/workspace-config#source-map-configuration", "default": false }, @@ -205,11 +193,7 @@ } }, "additionalProperties": false, - "required": [ - "glob", - "input", - "output" - ] + "required": ["glob", "input", "output"] }, { "type": "string" @@ -237,9 +221,7 @@ } }, "additionalProperties": false, - "required": [ - "input" - ] + "required": ["input"] }, { "type": "string", @@ -248,4 +230,4 @@ ] } } -} \ No newline at end of file +} diff --git a/code/frameworks/server-webpack5/template/cli/page.stories.yaml b/code/frameworks/server-webpack5/template/cli/page.stories.yaml index 08915865c89d..6dcca1651d0a 100644 --- a/code/frameworks/server-webpack5/template/cli/page.stories.yaml +++ b/code/frameworks/server-webpack5/template/cli/page.stories.yaml @@ -1,10 +1,10 @@ -title: "Example/Page" +title: 'Example/Page' parameters: server: - url: "https://storybook-server-demo.netlify.app/api" - id: "page" + url: 'https://storybook-server-demo.netlify.app/api' + id: 'page' stories: - - name: "LoggedIn" + - name: 'LoggedIn' args: user: {} - - name: "LoggedOut" + - name: 'LoggedOut' diff --git a/code/frameworks/sveltekit/tsconfig.json b/code/frameworks/sveltekit/tsconfig.json index 39029c2ce294..f5ab5afaf6a4 100644 --- a/code/frameworks/sveltekit/tsconfig.json +++ b/code/frameworks/sveltekit/tsconfig.json @@ -3,7 +3,7 @@ "baseUrl": ".", "paths": { "storybook/internal/*": ["../../lib/cli/core/*"] - }, + } }, "extends": "../../tsconfig.json", "include": ["src/**/*"] diff --git a/code/lib/eslint-plugin/docs/rules/no-stories-of.md b/code/lib/eslint-plugin/docs/rules/no-stories-of.md index a58f962f43e9..9a8cb23162f5 100644 --- a/code/lib/eslint-plugin/docs/rules/no-stories-of.md +++ b/code/lib/eslint-plugin/docs/rules/no-stories-of.md @@ -14,7 +14,6 @@ Examples of **incorrect** code for this rule: ```js import { storiesOf } from '@storybook/react'; - import Button from '../components/Button'; storiesOf('Button', module).add('primary', () =>