Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
const path = require('path');
module.exports = {
staticDirs: ["public"],
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
{
name: "@storybook/addon-essentials",
options: {
backgrounds: false
}
},
"@storybook/addon-a11y",
"@storybook/addon-storysource"
],
framework: {
staticDirs: ["public"],
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ["@storybook/addon-links", "@storybook/addon-a11y", '@storybook/addon-docs'],

framework: {
name: "@storybook/angular",
options: {}
},
core: {

core: {
disableTelemetry: true
},
docs: {
autodocs: true
}

docs: {},

features: {
backgrounds: false
}
};
4 changes: 2 additions & 2 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from '@storybook/addons';
import { create } from '@storybook/theming';
import { addons } from 'storybook/manager-api';
import { create } from 'storybook/theming';

addons.setConfig({
theme: create({
Expand Down
23 changes: 11 additions & 12 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ import { breakpoints } from '@carbon/layout';
// Add compodoc
import { setCompodocJson } from "@storybook/addon-docs/angular";
import {
classes,
components,
directives,
interfaces,
miscellaneous,
pipes
components
} from "../dist/docs/documentation.json";

import docJson from "../dist/docs/documentation.json";

/**
* Remove public properties from docs Json for each component.
* This is to prevent properties like `onTouched = () => {...}` & `propagateChange = () => {}`
Expand Down Expand Up @@ -41,12 +38,8 @@ components = components.map(comp => ({

// Integrate compodoc documentation with storybook
setCompodocJson({
classes,
components,
directives,
interfaces,
miscellaneous,
pipes
...docJson,
components
});

// Set carbon viewports options
Expand Down Expand Up @@ -90,8 +83,14 @@ export const parameters = {
},
},
},

controls: {
expanded: true
},

docs: {
codePanel: true
}
};

export const tags = ["autodocs"];
6 changes: 2 additions & 4 deletions .storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"allowSyntheticDefaultImports": true,
},
"include": [
"**/*.stories.ts",
"../src/**/*",
"../projects/**/*"
"../**/*.stories.ts",
],
"exclude": [],
"exclude": ["../src/**/*.spec.ts"],
}
14 changes: 9 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import storybook from "eslint-plugin-storybook";

module.exports = tseslint.config({
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import angular from "angular-eslint";

export default tseslint.config({
files: ["src/**/*.ts"],
extends: [
eslint.configs.recommended,
Expand Down Expand Up @@ -141,5 +144,6 @@ module.exports = tseslint.config({
"@angular-eslint/template/role-has-required-aria": "warn",
"@angular-eslint/template/alt-text": "warn"
},
}
},
storybook.configs['flat/recommended'],
);
Loading