@itcase/storybook-config 1.0.40 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import axios from 'axios'
2
2
  import camelCase from 'lodash/camelCase'
3
3
 
4
- async function getStoryInfoBlocks(infoBlockSlugsList: string[] = []) {
5
- const slugsList: string[] = []
6
- const regExpsList: RegExp[] = []
4
+ async function getStoryInfoBlocks(infoBlockSlugsList = []) {
5
+ const slugsList = []
6
+ const regExpsList = []
7
7
 
8
- infoBlockSlugsList.forEach((slug: string | RegExp) => {
8
+ infoBlockSlugsList.forEach((slug) => {
9
9
  if (slug instanceof RegExp) {
10
10
  regExpsList.push(slug)
11
11
  } else {
@@ -17,7 +17,7 @@ async function getStoryInfoBlocks(infoBlockSlugsList: string[] = []) {
17
17
  const slugsQuery = slugsList.join(',')
18
18
  const response = await axios.get(`${restBaseUrl}rest/infoblocks/?active=true&slugs=${slugsQuery}`)
19
19
  const infoBlocksList = response.data.results || []
20
- const infoBlocks = infoBlocksList.reduce((resultData: any, infoBlockItem: any) => {
20
+ const infoBlocks = infoBlocksList.reduce((resultData, infoBlockItem) => {
21
21
  const targetSlugRegExp = regExpsList.find((slugRegExp) => {
22
22
  return slugRegExp.test(infoBlockItem.slug)
23
23
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/storybook-config",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets",
6
6
  "engines": {
@@ -1,11 +1,11 @@
1
1
  import axios from 'axios'
2
2
  import camelCase from 'lodash/camelCase'
3
3
 
4
- async function getStoryInfoBlocks(infoBlockSlugsList: string[] = []) {
5
- const slugsList: string[] = []
6
- const regExpsList: RegExp[] = []
4
+ async function getStoryInfoBlocks(infoBlockSlugsList = []) {
5
+ const slugsList = []
6
+ const regExpsList = []
7
7
 
8
- infoBlockSlugsList.forEach((slug: string | RegExp) => {
8
+ infoBlockSlugsList.forEach((slug) => {
9
9
  if (slug instanceof RegExp) {
10
10
  regExpsList.push(slug)
11
11
  } else {
@@ -17,7 +17,7 @@ async function getStoryInfoBlocks(infoBlockSlugsList: string[] = []) {
17
17
  const slugsQuery = slugsList.join(',')
18
18
  const response = await axios.get(`${restBaseUrl}rest/infoblocks/?active=true&slugs=${slugsQuery}`)
19
19
  const infoBlocksList = response.data.results || []
20
- const infoBlocks = infoBlocksList.reduce((resultData: any, infoBlockItem: any) => {
20
+ const infoBlocks = infoBlocksList.reduce((resultData, infoBlockItem) => {
21
21
  const targetSlugRegExp = regExpsList.find((slugRegExp) => {
22
22
  return slugRegExp.test(infoBlockItem.slug)
23
23
  })