Skip to content

Commit

Permalink
improve: setup writing components in ts (#3364)
Browse files Browse the repository at this point in the history
chore: update  deps

chore: update svgr deps

refactor: use ts-node for config files

refactor: use esm

chore: remove @babel/types as dep

chore: move scripts to ts files from mjs

chore: rename storybook cfg files to cjs

chore: rename js files to cjs

chore: use zx in docs

chore: change cypress file extensions

chore: remove tsup and cpy deps

refactor: split build config

refactor: use mts file extension and keep legacy module

chore: add extraFileExtensions to eslint for ts

chore: use normal ts extension for jest config files

chore: add @babel/preset-typescript to webpack

chore: remove argv flowgen from generateTypeDeclarations

chore: remove argv flowgen from generateTypeDeclarations

fix: fix common types for flowgen

refactor: first bunch to ts (#3551)

* refactor(Badge): refactor to ts

* chore(tokens): sort tokens output (#3550)

* refactor(Accordion): refactor to ts

* refactor(common): getSpacingToken to ts

* refactor(AirportIllustration): refactor to ts

* refactor(IllustrationPrimitive): refactor to ts

* refactor(Alert): refactor to ts

* refactor(List): refactor List to ts

* refactor(Text): refactor to ts

* refactor(rtl): refactor to ts

* refactor(TextLink): refactor to ts

* fix(TextLink): fix wrong type for onClick

* refactor(Breadcrumbs): refactor to ts

* refactor(BadgeList): refactor to ts

* refactor(BaggageStepper): refactor to ts

* docs: add Itinerary story with modal (#3552)

* refactor(Box): refactor to ts

* improve: setup writing components in ts (#3364)

chore: update  deps

chore: update svgr deps

refactor: use ts-node for config files

refactor: use esm

chore: remove @babel/types as dep

chore: move scripts to ts files from mjs

chore: rename storybook cfg files to cjs

chore: rename js files to cjs

chore: use zx in docs

chore: change cypress file extensions

chore: remove tsup and cpy deps

refactor: split build config

refactor: use mts file extension and keep legacy module

chore: add extraFileExtensions to eslint for ts

chore: use normal ts extension for jest config files

* refactor(utils): mediaQuery add ts file

* refactor(Coupon): refactor to ts

* refactor(CountryFlag): refactor to ts

* refactor(Collapse): refactor to ts

* refactor(ClickOutside): refactor to ts

* refactor(ChoiceGroup): refactor to ts

* refactor(CarrierLogo): refactor to ts

* refactor(Card): refactor to ts

* refactor(CallOutBanner): refactor to ts

* refactor(CallOutBanner): refactor to ts

* refactor(Button): refactor to ts

* refactor(ButtonGroup): refactor to ts

* refactor(ButtonLink): refactor to ts

* refactor(ButtonMobileStore): refactor to ts

* refactor(ButtonPrimitive): refactor to ts

refactor: second bunch of refactoring to ts (#3554)

* refactor(Desktop): refactor to ts

* refactor(Mobile): refactor to ts

* refactor(Loading): refactor to ts

* refactor(ListChoice): refactor to ts

* refactor(NavigationBar): refactor to ts

* refactor(NotificationBadge): refactor to ts

* refactor(Pagination): refactor to ts

* refactor(Dialog): refactor to ts

* refactor(Dictionary): refactor to ts

* refactor(useDictionary): refactor to ts

* refactor(Translate): refactor to ts

* refactor(LinkList): refactor to ts

* refactor(Popover): refactor to ts

* refactor(Portal): refactor to ts

* refactor(PictureCard): refactor to ts

* refactor(Radio): refactor to ts

* refactor(useTranslate): refactor to ts

* refactor(RatingStars): refactor to ts

* refactor(RatingStars): refactor to ts

* refactor(Seat): refactor to ts

* refactor(Seat): refactor to ts

* refactor(Select): refactor to ts

* refactor(Separator): refactor to ts

* refactor(ServiceLogo): refactor to ts

* refactor(Skeleton): refactor to ts

* refactor(SkipLink): refactor to ts

* refactor(SkipNavigation): refactor to ts

* refactor(SocialButton): refactor to ts

* refactor(Stack): refactor to ts

* refactor(Stepper): refactor to ts

* refactor(StopoverArrow): refactor to ts

* refactor(Switch): refactor to ts

* refactor(Switch): refactor to ts

* chore: fix types for utils handleKeyDown

* refactor(Table): refactor to ts

* refactor(Tag): refactor to ts

* refactor(InputField): refactor to ts

* refactor(FormLabel): refactor to ts

* refactor(FormLabel): refactor to ts

* refactor(Drawer): refactor Drawer to ts

* refactor(Heading): refactor to ts

* refactor(Hide): refactor to ts

* refactor(HorizontalScroll): refactor to ts

* refactor(Textarea): refactor to ts

* refactor(KeyValue): refactor to ts

* refactor(Illustration): refactor to ts

* refactor(Tooltip): refactor to ts

* refactor(TooltipPrimitive): refactor to ts

* refactor(MobileDialogPrimitive): refactor to ts

* refactor(Toast): refactor to ts

* refactor(Toast): refactor to ts

* refactor(Truncate): refactor to ts

* refactor(ErrorFormTooltip): refactor to ts

* refactor(ErrorForms): refactor ErrorForms.stories to ts

* refactor(FeatureIcon): refactor to ts

* refactor(FeatureIcon): refactor to ts

* refactor(Layout): refactor to ts

* refactor(InputFile): refactor to ts

* refactor(InputGroup): refactor to ts

* refactor(Inline): refactor to ts

* refactor(Timeline): refactor to ts

* refactor(ThemeProvider): refactor to ts

* refactor(Tile): refactor to ts

* refactor(TileGroup): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Icon): refactor to ts

* refactor(Wizard): refactor to ts

* refactor(SmartPassIllustration): refactor to ts

* refactor(InputStepper): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Itinerary): refactor to ts

* refactor(Modal): refactor to ts

refactor: second bunch of refactoring to ts (#3554)

* refactor(Desktop): refactor to ts

* refactor(Mobile): refactor to ts

* refactor(Loading): refactor to ts

* refactor(ListChoice): refactor to ts

* refactor(NavigationBar): refactor to ts

* refactor(NotificationBadge): refactor to ts

* refactor(Pagination): refactor to ts

* refactor(Dialog): refactor to ts

* refactor(Dictionary): refactor to ts

* refactor(useDictionary): refactor to ts

* refactor(Translate): refactor to ts

* refactor(LinkList): refactor to ts

* refactor(Popover): refactor to ts

* refactor(Portal): refactor to ts

* refactor(PictureCard): refactor to ts

* refactor(Radio): refactor to ts

* refactor(useTranslate): refactor to ts

* refactor(RatingStars): refactor to ts

* refactor(RatingStars): refactor to ts

* refactor(Seat): refactor to ts

* refactor(Seat): refactor to ts

* refactor(Select): refactor to ts

* refactor(Separator): refactor to ts

* refactor(ServiceLogo): refactor to ts

* refactor(Skeleton): refactor to ts

* refactor(SkipLink): refactor to ts

* refactor(SkipNavigation): refactor to ts

* refactor(SocialButton): refactor to ts

* refactor(Stack): refactor to ts

* refactor(Stepper): refactor to ts

* refactor(StopoverArrow): refactor to ts

* refactor(Switch): refactor to ts

* refactor(Switch): refactor to ts

* chore: fix types for utils handleKeyDown

* refactor(Table): refactor to ts

* refactor(Tag): refactor to ts

* refactor(InputField): refactor to ts

* refactor(FormLabel): refactor to ts

* refactor(FormLabel): refactor to ts

* refactor(Drawer): refactor Drawer to ts

* refactor(Heading): refactor to ts

* refactor(Hide): refactor to ts

* refactor(HorizontalScroll): refactor to ts

* refactor(Textarea): refactor to ts

* refactor(KeyValue): refactor to ts

* refactor(Illustration): refactor to ts

* refactor(Tooltip): refactor to ts

* refactor(TooltipPrimitive): refactor to ts

* refactor(MobileDialogPrimitive): refactor to ts

* refactor(Toast): refactor to ts

* refactor(Toast): refactor to ts

* refactor(Truncate): refactor to ts

* refactor(ErrorFormTooltip): refactor to ts

* refactor(ErrorForms): refactor ErrorForms.stories to ts

* refactor(FeatureIcon): refactor to ts

* refactor(FeatureIcon): refactor to ts

* refactor(Layout): refactor to ts

* refactor(InputFile): refactor to ts

* refactor(InputGroup): refactor to ts

* refactor(Inline): refactor to ts

* refactor(Timeline): refactor to ts

* refactor(ThemeProvider): refactor to ts

* refactor(Tile): refactor to ts

* refactor(TileGroup): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Icon): refactor to ts

* refactor(Wizard): refactor to ts

* refactor(SmartPassIllustration): refactor to ts

* refactor(InputStepper): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Itinerary): refactor to ts

* refactor(Modal): refactor to ts

refactor(BadgePrimitive): refactor to ts

refactor(utils): refactor utils to ts

refactor(deprecated): refactor to ts

refactor(useBoundingRect): refactor to ts

refactor(hooks): refactor hooks to ts

refactor(common): refactor commons to ts

refactor: refactor repo to ts, fix ts errors

refactor: refactor repo to ts, fix ts errors

chore: bump ts version

chore: update build script

refactor: move ts types to types files

refactor: move ts types to types files

chore(build): remove flow template for buildIcons

chore: remove Flow comments

chore: remove Flow comments

refactor: second bunch of refactoring to ts (#3554)

* refactor(Desktop): refactor to ts

* refactor(Mobile): refactor to ts

* refactor(Loading): refactor to ts

* refactor(ListChoice): refactor to ts

* refactor(NavigationBar): refactor to ts

* refactor(NotificationBadge): refactor to ts

* refactor(Pagination): refactor to ts

* refactor(Dialog): refactor to ts

* refactor(Dictionary): refactor to ts

* refactor(useDictionary): refactor to ts

* refactor(Translate): refactor to ts

* refactor(LinkList): refactor to ts

* refactor(Popover): refactor to ts

* refactor(Portal): refactor to ts

* refactor(PictureCard): refactor to ts

* refactor(Radio): refactor to ts

* refactor(useTranslate): refactor to ts

* refactor(RatingStars): refactor to ts

* refactor(RatingStars): refactor to ts

* refactor(Seat): refactor to ts

* refactor(Seat): refactor to ts

* refactor(Select): refactor to ts

* refactor(Separator): refactor to ts

* refactor(ServiceLogo): refactor to ts

* refactor(Skeleton): refactor to ts

* refactor(SkipLink): refactor to ts

* refactor(SkipNavigation): refactor to ts

* refactor(SocialButton): refactor to ts

* refactor(Stack): refactor to ts

* refactor(Stepper): refactor to ts

* refactor(StopoverArrow): refactor to ts

* refactor(Switch): refactor to ts

* refactor(Switch): refactor to ts

* chore: fix types for utils handleKeyDown

* refactor(Table): refactor to ts

* refactor(Tag): refactor to ts

* refactor(InputField): refactor to ts

* refactor(FormLabel): refactor to ts

* refactor(FormLabel): refactor to ts

* refactor(Drawer): refactor Drawer to ts

* refactor(Heading): refactor to ts

* refactor(Hide): refactor to ts

* refactor(HorizontalScroll): refactor to ts

* refactor(Textarea): refactor to ts

* refactor(KeyValue): refactor to ts

* refactor(Illustration): refactor to ts

* refactor(Tooltip): refactor to ts

* refactor(TooltipPrimitive): refactor to ts

* refactor(MobileDialogPrimitive): refactor to ts

* refactor(Toast): refactor to ts

* refactor(Toast): refactor to ts

* refactor(Truncate): refactor to ts

* refactor(ErrorFormTooltip): refactor to ts

* refactor(ErrorForms): refactor ErrorForms.stories to ts

* refactor(FeatureIcon): refactor to ts

* refactor(FeatureIcon): refactor to ts

* refactor(Layout): refactor to ts

* refactor(InputFile): refactor to ts

* refactor(InputGroup): refactor to ts

* refactor(Inline): refactor to ts

* refactor(Timeline): refactor to ts

* refactor(ThemeProvider): refactor to ts

* refactor(Tile): refactor to ts

* refactor(TileGroup): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Icon): refactor to ts

* refactor(Wizard): refactor to ts

* refactor(SmartPassIllustration): refactor to ts

* refactor(InputStepper): refactor to ts

* refactor(Slide): refactor to ts

* refactor(Itinerary): refactor to ts

* refactor(Modal): refactor to ts

refactor(typeFiles): template should be created to types.ts file

chore: resolve merge conflicts

chore: fix ts errors in stories

chore: fix ts checks

docs: fix modal consts import

refactor: storybook cfg to ts

refactor: fix lint errors

refactor: fixes after refactoring

fix(Stack): fix getViewportFlexStyles types

fix(Stack): fix getViewportFlexStyles types

chore: remove redundant flow

fix: eslint errors

fix: storybook lint error config

feat(hooks): add useEventListener hook

fix(tests): fix test errors

chore: update flow and flow-typed

chore(build): use ast to transform incorrect flowgen output

chore: remove redundant flowtyped definitions

chore: remove redundant flowtyped definitions

chore: remove redundant flowtyped definitions

chore: fix incorrect flowgen output

chore: add flow check only on ci

chore: rebase with current master

chore: fixes after rebase

refactor: return flow definitions
  • Loading branch information
mainframev committed Nov 7, 2022
1 parent 8ba652e commit 7b14618
Show file tree
Hide file tree
Showing 2,042 changed files with 63,294 additions and 84,982 deletions.
12 changes: 4 additions & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ packages/babel-plugin-orbit-components/__fixtures__/
packages/eslint-plugin-orbit-components/dist
!.storybook
!.remarkrc.js
!.size-limit.cjs
!.size-limit.js

# from gitignore
packages/orbit-components/src/icons/*
packages/orbit-components/src/Illustration/index.*.flow
packages/orbit-components/src/AirportIllustration/index.*.flow
packages/orbit-components/src/ServiceLogo/index.*.flow
packages/orbit-components/src/FeatureIcon/index.*.flow
packages/orbit-components/src/Illustration/index.d.ts
packages/orbit-components/src/AirportIllustration/index.d.ts
packages/orbit-components/src/ServiceLogo/index.d.ts
packages/orbit-components/src/FeatureIcon/index.d.ts

docs/.cache
docs/public

# orbit design tokens
packages/orbit-design-tokens/output/

# transforms
packages/orbit-components/transforms/__testfixtures__/*
98 changes: 56 additions & 42 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @noflow
const { DEV_DEPENDENCIES } = require("./utils/eslint");

module.exports = {
root: true,
reportUnusedDisableDirectives: true,
Expand All @@ -14,31 +15,6 @@ module.exports = {
"no-unused-expressions": "off",
"babel/no-unused-expressions": "error",
"import/no-useless-path-segments": ["error", { noUselessIndex: true }],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [
"**/*.test.*",
"**/__tests__/**",
"**/__testfixtures__/**",
"**/__examples__/**",
"**/cypress/**",
"**/*.stories.*",
"**/*.config.*",
"**/stories/**",
"**/tasks/**",
"docs/**",
"packages/eslint-plugin-orbit-components/**",
"packages/orbit-design-tokens/src/theo/**",
"packages/*/.storybook/**",
"**/config/**",
"**/scripts/**",
"publish.mjs",
"**/.remarkrc.js",
"**/.size-limit.js",
],
},
],
"import/order": [
"error",
{
Expand Down Expand Up @@ -71,8 +47,24 @@ module.exports = {
"react/no-access-state-in-setstate": "off",
"jsx-a11y/label-has-associated-control": "off",
"no-await-in-loop": "off",
// to improve performance locally
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#my-linting-feels-really-slow
...(!process.env.CI
? {
"import/no-named-as-default": "off",
"import/no-cycle": "off",
"import/no-unused-modules": "off",
"import/no-deprecated": "off",
}
: null),
},
overrides: [
{
files: DEV_DEPENDENCIES,
rules: {
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
},
},
{
files: ["*.js?(x)", "*.js?(x).flow"],
extends: ["plugin:flowtype/recommended", "prettier"],
Expand All @@ -84,21 +76,32 @@ module.exports = {
},
},
{
files: "*.ts?(x)",
files: ["packages/orbit-components/{src,es,lib}/**/*.js?(x)", "*.js?(x).flow"],
rules: {
"flowtype/require-valid-file-annotation": ["error", "always"],
},
},
{
files: ["*.ts?(x)", "*.d.ts", "*.mts"],
extends: [
// disables core ESLint rules which are handled by TypeScript
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parserOptions: {
extraFileExtensions: [".mts"],
tsconfigRootDir: __dirname,
project: [
"./tsconfig.scripts.json",
"./tsconfig.json",
"./packages/orbit-tracking/tsconfig.json",
"./packages/*/tsconfig.json",
"./packages/*/scripts/tsconfig.json",
"./packages/orbit-components/.storybook/tsconfig.json",
"./docs/tsconfig.json",
"./packages/orbit-components/cypress/tsconfig.json",
],
ecmaVersion: 2018,
ecmaVersion: 2020,
sourceType: "module",
},
settings: {
Expand All @@ -110,7 +113,7 @@ module.exports = {
},
rules: {
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "error",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/no-empty-function": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
Expand All @@ -129,6 +132,10 @@ module.exports = {
},
],
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
"import/named": "off",
"import/namespace": "off",
"import/default": "off",
"import/no-named-as-default-member": "off",
},
},
{
Expand Down Expand Up @@ -184,8 +191,6 @@ module.exports = {
{
files: "docs/**",
rules: {
// we're not using Flow in docs
"flowtype/require-valid-file-annotation": "off",
// these make sense for libraries, but not documentation
"global-require": "off",
camelcase: "off",
Expand Down Expand Up @@ -251,6 +256,25 @@ module.exports = {
"@typescript-eslint/prefer-readonly-parameter-types": "off",
},
},
{
files: ["packages/orbit-components/scripts/*"],
rules: {
"no-console": "off",
"no-restricted-syntax": "off",
},
},
{
files: ["packages/orbit-tracking/src/**/*", "packages/orbit-components/config/**/*"],
rules: {
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-syntax": "off",
"guard-for-in": "off",
"no-console": "off",
"import/extensions": "off",
},
},
{
files: ["packages/eslint-plugin-orbit-components/src/**"],
rules: {
Expand All @@ -269,16 +293,6 @@ module.exports = {
"orbit-components/unique-id": "off",
},
},
{
files: [
"packages/orbit-components/{src,es,lib}/**/*.js?(x)",
"packages/orbit-design-tokens/{src,es,lib}/**/*.js?(x)",
"*.js?(x).flow",
],
rules: {
"flowtype/require-valid-file-annotation": ["error", "always"],
},
},
{
files: "**/config/**",
globals: {
Expand Down
13 changes: 9 additions & 4 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

## Table of Contents

- [Commit message & history](#commit-message-history)
- [Repository structure](#repository-structure)
- [Environment requirements](#environment-requirements)
- [Contribution guide](#contribution-guide)
- [Table of Contents](#table-of-contents)
- [Commit message & history](#commit-message--history)
- [Repository Structure](#repository-structure)
- [`@kiwicom/orbit-components`](#kiwicomorbit-components)
- [`@kiwicom/babel-plugin-orbit-components`](#kiwicombabel-plugin-orbit-components)
- [Root](#root)
- [Environment Requirements](#environment-requirements)
- [How to develop](#how-to-develop)
- [Testing](#testing)

---
Expand Down Expand Up @@ -81,7 +87,6 @@ This is a shortcut for `yalc publish --push`, which "publishes" the package agai

Run `yarn test-ci` to perform the same automatic checks as the CI server. You can also run some of these checks separately:

- `yarn flow` - Flow check
- `yarn tsc` - TypeScript check
- `yarn eslint .` - ESLint check
- `yarn test` - run all Jest tests
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
yarn tracking build
- name: Type checks
run: yarn check:types
run: yarn check:types && yarn flow check

- name: Lint
run: |
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ build/Release
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/
# TypeScript incremental compilation information
*.tsbuildinfo

# Optional npm cache directory
.npm
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("./packages/orbit-components/.size-limit");
module.exports = require("./packages/orbit-components/.size-limit.js");
9 changes: 6 additions & 3 deletions docs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// this disables Gatbsy's built-in eslint-loader
// https://www.gatsbyjs.com/docs/eslint/#disabling-eslint
module.exports = {};
// adding an ESLint config disables Gatbsy's built-in eslint-loader
module.exports = {
rules: {
"import/no-extraneous-dependencies": ["error", { packageDir: [__dirname, `${__dirname}/..`] }],
},
};
12 changes: 7 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "gatsby develop",
"fetch:contributors": "babel-node ./plugins/contributors/fetchContributors.mjs",
"check:types": "tsc",
"build": "gatsby build",
"clean": "gatsby clean",
"serve": "gatsby serve",
Expand All @@ -20,10 +21,10 @@
},
"dependencies": {
"@adeira/js": "^2.1.1",
"@babel/core": "^7.18.2",
"@babel/generator": "^7.17.9",
"@babel/runtime": "^7.18.2",
"@babel/standalone": "^7.17.6",
"@babel/core": "^7.18.9",
"@babel/generator": "^7.18.9",
"@babel/standalone": "^7.18.9",
"@csstools/convert-colors": "^2.0.0",
"@icons-pack/react-simple-icons": "^4.0.0",
"@jsdevtools/rehype-url-inspector": "^2.0.2",
Expand Down Expand Up @@ -99,7 +100,6 @@
"jsondiffpatch": "^0.4.1",
"lodash": "^4.17.21",
"memfs": "^3.2.0",
"prettier": "^2.1.2",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -121,6 +121,8 @@
"unist-util-visit": "^2.0.3",
"use-resize-observer": "^8.0.0",
"uuid": "^8.3.2",
"vfile-reporter": "^7.0.4"
"webpack": "^5.74.0",
"vfile-reporter": "^7.0.4",
"zx": "7.0.7"
}
}
3 changes: 1 addition & 2 deletions docs/services/changelog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import remark from "remark";
// eslint-disable-next-line import/no-extraneous-dependencies
import mdx from "remark-mdx";
import path from "path";
import { read, write } from "to-vfile";
Expand All @@ -18,7 +17,7 @@ export default async () => {
try {
const file = await read(path.resolve(process.cwd(), "packages/orbit-components/CHANGELOG.md"));

const { contents } = await remark().use(mdx).use(headings).process(file);
const contents = await remark().use(mdx).use(headings).process(file);
const output = contents.toString().replace("## Change Log", "");

await write({
Expand Down
3 changes: 1 addition & 2 deletions docs/services/checkLinks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import globby from "globby";
import server from "browser-sync";
import checkLinks from "check-links";
import path from "path";
import { path, globby } from "zx";
import unified from "unified";
import parse from "rehype-parse";
import inspectUrls from "@jsdevtools/rehype-url-inspector";
Expand Down
1 change: 0 additions & 1 deletion docs/src/__examples__/Modal/SIZES.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import defaultTheme from "@kiwicom/orbit-components/lib/defaultTheme";
import { Button, Stack, ModalSection, Modal } from "@kiwicom/orbit-components";

export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/__examples__/SocialButton/services.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { SocialButton, Stack } from "@kiwicom/orbit-components";
import { SocialButton } from "@kiwicom/orbit-components";

export default {
Example: () => <SocialButton type="apple">Sign in with Apple </SocialButton>,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/BrandedTile.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Heading, Stack, Button, Grid, mediaQueries as mq } from "@kiwicom/orbit-components";
import { Heading, Stack, Button, mediaQueries as mq } from "@kiwicom/orbit-components";
import { StyledButtonPrimitive } from "@kiwicom/orbit-components/lib/primitives/ButtonPrimitive";
import useTheme from "@kiwicom/orbit-components/lib/hooks/useTheme";
import styled, { css } from "styled-components";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const ComponentStatusList = () => {
{item.docs === "Released" ? (
<TextLink
standAlone
// @ts-expect-error "asComponent" is not correctly typed
asComponent={OrbitGatsbyLink}
href={`/components/${group
.toLowerCase()
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/HeadingWithLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import styled, { css } from "styled-components";
import { Stack } from "@kiwicom/orbit-components";
import { Link as LinkIcon } from "@kiwicom/orbit-components/icons";
import { SpaceAfter } from "@kiwicom/orbit-components/lib/common/common";
import * as Common from "@kiwicom/orbit-components/lib/common/types";

import { getTextFromChildren, slugify } from "../utils/common";

Expand Down Expand Up @@ -39,7 +39,7 @@ export const StyledAnchor = styled.a<{ $level: number }>`
`}
`;

interface Props extends SpaceAfter {
interface Props extends Common.SpaceAfter {
level: number;
children?: React.ReactNode;
noId?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const PropsTable = ({ children }) => {
return (
<StyledTableOuter ref={outer} showShadows={shadows} showLeft={left} showRight={right}>
<StyledTableInner ref={inner} onScroll={handleScroll} showShadows={shadows}>
<Table ref={table}>
<Table ref={table} type="primary">
<PropsTableHead
tableHeaders={tableHeaders}
handleSortingChange={handleSortingChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ redirect_from:
- /components/modal/
---

import { SIZES as MODAL_SIZES } from "@kiwicom/orbit-components/src/Modal/consts.js";
import { SIZES as MODAL_SIZES } from "@kiwicom/orbit-components/src/Modal/consts";
import theme from "@kiwicom/orbit-components/lib/defaultTheme";

<ReactExample exampleId="Modal-header_footer" height={420} />
Expand Down
Loading

0 comments on commit 7b14618

Please sign in to comment.