storyblok / storyblok-cli

Storyblok CLI
https://www.npmjs.com/package/storyblok
MIT License
33 stars 30 forks source link

[Feature Request] add option to specify typescript-eslint rules for the generated types file #84

Closed Youhan closed 8 months ago

Youhan commented 8 months ago

Current behavior: Currently the generated file is inconsistent with the formating of my project and I have to manually save the file to fix them. It would be nice to offer a way to output the generated file in a desired format, or a way to format it after creation.

import {StoryblokStory} from 'storyblok-generate-ts'
// and 
export interface ArticlesCarouselStoryblok {
  count?: string;
}

Expected behavior:

// https://typescript-eslint.io/rules/consistent-type-imports/
import type { StoryblokStory } from 'storyblok-generate-ts'

export interface ArticlesCarouselStoryblok {
  count?: string // no ;
}
Youhan commented 8 months ago

I guess a lint --fix script would fix it!