try again

This commit is contained in:
Jon McClure 2023-09-18 07:56:39 +01:00
parent 5e0df3456a
commit 638a6f1037
5 changed files with 518 additions and 428 deletions

View file

@ -2,8 +2,8 @@ module.exports = {
root: true,
parser: '@typescript-eslint/parser',
ignorePatterns: ['node_modules', 'docs/**'],
extends: ['standard'],
plugins: ['svelte3', '@typescript-eslint'],
extends: ['standard', 'plugin:svelte/recommended'],
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
@ -15,10 +15,6 @@ module.exports = {
browser: true,
es2022: true,
},
settings: {
'svelte3/ignore-styles': () => true,
'svelte3/typescript': require('typescript'),
},
rules: {
indent: ['error', 2, { 'SwitchCase': 1 }],
semi: ['error', 'always'],
@ -38,7 +34,10 @@ module.exports = {
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3',
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
},
rules: {
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 2 }],
'import/first': 'off',

View file

@ -37,21 +37,21 @@
"@babel/preset-env": "^7.21.4",
"@evilmartians/lefthook": "^1.3.10",
"@reuters-graphics/eslint-config": "^0.0.2",
"@storybook/addon-actions": "^7.3.0",
"@storybook/addon-docs": "^7.3.0",
"@storybook/addon-essentials": "^7.3.0",
"@storybook/addon-interactions": "^7.3.0",
"@storybook/addon-links": "^7.3.0",
"@storybook/addon-mdx-gfm": "^7.3.0",
"@storybook/addon-svelte-csf": "3.0.7",
"@storybook/blocks": "^7.3.0",
"@storybook/builder-vite": "^7.3.0",
"@storybook/manager-api": "^7.3.0",
"@storybook/addon-actions": "^7.4.2",
"@storybook/addon-docs": "^7.4.2",
"@storybook/addon-essentials": "^7.4.2",
"@storybook/addon-interactions": "^7.4.2",
"@storybook/addon-links": "^7.4.2",
"@storybook/addon-mdx-gfm": "^7.4.2",
"@storybook/addon-svelte-csf": "^4.0.7",
"@storybook/blocks": "^7.4.2",
"@storybook/builder-vite": "^7.4.2",
"@storybook/manager-api": "^7.4.2",
"@storybook/mdx2-csf": "^1.1.0",
"@storybook/svelte": "^7.3.0",
"@storybook/svelte-vite": "^7.3.0",
"@storybook/svelte": "^7.4.2",
"@storybook/svelte-vite": "^7.4.2",
"@storybook/testing-library": "^0.1.0",
"@storybook/theming": "^7.3.0",
"@storybook/theming": "^7.4.2",
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"@tsconfig/svelte": "^4.0.1",
"@types/gtag.js": "^0.0.12",
@ -78,7 +78,7 @@
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-storybook": "^0.6.12",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-svelte": "^2.33.1",
"fs-extra": "^11.1.1",
"kleur": "^4.1.5",
"mermaid": "^10.3.0",
@ -96,13 +96,13 @@
"remark-gfm": "^3.0.1",
"rimraf": "^5.0.0",
"sass": "^1.65.1",
"storybook": "^7.3.0",
"storybook": "^7.4.2",
"svelte": "^4.2.0",
"svelte-loader": "^3.1.9",
"svelte-preprocess": "^5.0.4",
"svelte2tsx": "^0.6.20",
"svelte2tsx": "^0.6.21",
"tiny-glob": "^0.2.9",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"vite": "^4.4.9"
},
"dependencies": {
@ -361,4 +361,4 @@
"url": "https://github.com/reuters-graphics/graphics-components/issues"
},
"readme": "ERROR: No README data found!"
}
}

View file

@ -1,30 +1,13 @@
<script>
import { Meta, Template, Story } from '@storybook/addon-svelte-csf';
<script context="module">
import SiteHeadline from './SiteHeadline.svelte';
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
// @ts-ignore
import componentDocs from './stories/docs/component.md?raw';
// @ts-ignore
import quickitDocs from './stories/docs/quickit.md?raw';
import SiteHeadline from './SiteHeadline.svelte';
import {
withComponentDocs,
withStoryDocs,
} from '$lib/docs/utils/withParams.js';
const content = {
Section: 'Global News',
SectionUrl: '',
Hed: 'A beautiful page',
Authors: 'Samuel Granados, Dea Bankova',
Published: '2022-09-12T08:30:00.000Z',
Updated: '',
};
const metaProps = {
export const meta = {
title: 'Components/SiteHeadline',
component: SiteHeadline,
...withComponentDocs(componentDocs),
// https://storybook.js.org/docs/svelte/essentials/controls
argTypes: {
hedSize: {
control: 'select',
@ -34,11 +17,23 @@
};
</script>
<Meta
title="Components/SiteHeadline"
component="{SiteHeadline}"
{...metaProps}
/>
<script>
import { Template, Story } from '@storybook/addon-svelte-csf';
// @ts-ignore
import quickitDocs from './stories/docs/quickit.md?raw';
import { withStoryDocs } from '$lib/docs/utils/withParams.js';
const content = {
Section: 'Global News',
SectionUrl: '',
Hed: 'A beautiful page',
Authors: 'Samuel Granados, Dea Bankova',
Published: '2022-09-12T08:30:00.000Z',
Updated: '',
};
</script>
<Template let:args>
<SiteHeadline {...args} />

View file

@ -34,6 +34,7 @@
"bin/**/*.{js,cjs}",
"*.ts",
"*.js",
"*.cjs",
"src/docs/**/*.css"
],
"exclude": ["dist"]

845
yarn.lock

File diff suppressed because it is too large Load diff