diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..fbfc4d9 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[{*.json,*.yml,*.yaml}] +indent_style = space +indent_size = 2 + +[GNUmakefile] +indent_style = tab +indent_size = 4 diff --git a/package-lock.json b/package-lock.json index fbad7c3..c730128 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "devDependencies": { "@diplodoc/eslint-config": "^2.0.0", - "@diplodoc/prettier-config": "^1.0.0", + "@diplodoc/prettier-config": "^2.0.0", "@diplodoc/transform": "^4.7.0", "@diplodoc/tsconfig": "^1.0.2", "@types/github-slugger": "^2.0.0", @@ -24,7 +24,6 @@ "jest": "^29.5.0", "markdown-it": "^13.0.1", "npm-run-all": "^4.1.5", - "prettier": "^2.8.8", "ts-jest": "^29.1.0", "typescript": "^5.0.2" }, @@ -1183,22 +1182,6 @@ "node": ">=10" } }, - "node_modules/@diplodoc/eslint-config/node_modules/prettier": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", - "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", - "dev": true, - "peer": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/@diplodoc/eslint-config/node_modules/safe-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", @@ -1215,12 +1198,13 @@ "dev": true }, "node_modules/@diplodoc/prettier-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@diplodoc/prettier-config/-/prettier-config-1.0.0.tgz", - "integrity": "sha512-g4dShJe/sRPTorvBX0VnTQj38dvTHRVdAB6wxuSU3lEpR4jUl/kKYShvKwAYZFhNmERj0dXPV0DJFr3krI4K/Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@diplodoc/prettier-config/-/prettier-config-2.0.0.tgz", + "integrity": "sha512-pmhLIPxNFcm6DHFiVopfes7+jUShOM+oo3eJW2LgQjW+fNYzwxhoTInFv7nNHd99ooguzKELvBjZQsBVRuYY5w==", "dev": true, - "peerDependencies": { - "prettier": "*" + "dependencies": { + "@gravity-ui/prettier-config": "^1.1.0", + "prettier": "^3.0.3" } }, "node_modules/@diplodoc/tabs-extension": { @@ -1830,6 +1814,15 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@gravity-ui/prettier-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@gravity-ui/prettier-config/-/prettier-config-1.1.0.tgz", + "integrity": "sha512-Q97lMSOqdAf337qblkq06mLgK9OEEGglPAj8ncs3WnaZ2rBtOxtNsCIubv5U64TZkxaNPzxd7rDL24VIv1sxJg==", + "dev": true, + "peerDependencies": { + "prettier": "*" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", @@ -7891,15 +7884,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" diff --git a/package.json b/package.json index ac09911..c92c633 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@diplodoc/eslint-config": "^2.0.0", - "@diplodoc/prettier-config": "^1.0.0", + "@diplodoc/prettier-config": "^2.0.0", "@diplodoc/transform": "^4.7.0", "@diplodoc/tsconfig": "^1.0.2", "@types/github-slugger": "^2.0.0", @@ -61,7 +61,6 @@ "jest": "^29.5.0", "markdown-it": "^13.0.1", "npm-run-all": "^4.1.5", - "prettier": "^2.8.8", "ts-jest": "^29.1.0", "typescript": "^5.0.2" } diff --git a/src/react/index.ts b/src/react/index.ts index 0406a3e..00a4380 100644 --- a/src/react/index.ts +++ b/src/react/index.ts @@ -1 +1,2 @@ -export {useDiplodocTabs, Tab, UseDiplodocTabsCallback} from './useDiplodocTabs'; +export type {Tab, UseDiplodocTabsCallback} from './useDiplodocTabs'; +export {useDiplodocTabs} from './useDiplodocTabs'; diff --git a/src/react/useDiplodocTabs.ts b/src/react/useDiplodocTabs.ts index bf200f5..550e6ca 100644 --- a/src/react/useDiplodocTabs.ts +++ b/src/react/useDiplodocTabs.ts @@ -2,7 +2,7 @@ import {useCallback, useEffect} from 'react'; import {GLOBAL_SYMBOL, SelectedTabEvent, Tab} from '../common'; import {ISelectTabByIdOptions} from '../runtime/TabsController'; -export {Tab}; +export type {Tab}; export type UseDiplodocTabsCallback = (tab: Tab, currentTabId?: string) => void;