Skip to content

Commit 639205e

Browse files
authored
feat!: update to @gravity-ui/uikit v6 (#66)
1 parent 7fa5232 commit 639205e

36 files changed

+19515
-16484
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ insert_final_newline = true
99
max_line_length = 120
1010
trim_trailing_whitespace = true
1111

12+
[{*.json, *.yaml, *.yml}]
13+
indent_size = 2
14+
1215
[*.md]
1316
max_line_length = 0
1417
trim_trailing_whitespace = false

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
storybook-static
22
build
3+
!/.storybook

.eslintrc

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
11
{
2-
"extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier"],
2+
"extends": [
3+
"@gravity-ui/eslint-config",
4+
"@gravity-ui/eslint-config/import-order",
5+
"@gravity-ui/eslint-config/client",
6+
"@gravity-ui/eslint-config/prettier"
7+
],
38
"root": true,
4-
"env": {
5-
"node": true
6-
}
9+
"rules": {
10+
"react/jsx-fragments": ["error", "element"],
11+
"react/react-in-jsx-scope": "off",
12+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
13+
"@typescript-eslint/consistent-type-imports": [
14+
"error",
15+
{"prefer": "type-imports", "fixStyle": "separate-type-imports"}
16+
]
17+
},
18+
"overrides": [
19+
{
20+
"files": ["**/__stories__/**/*.[jt]s?(x)"],
21+
"rules": {
22+
"no-console": "off"
23+
}
24+
},
25+
{
26+
"files": ["**/*.js", "!src/**/*"],
27+
"env": {
28+
"node": true
29+
}
30+
}
31+
]
732
}

.github/workflows/ci.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,33 @@ name: Node.js CI
22

33
on:
44
pull_request:
5-
branches: [ '**' ]
5+
branches: ['**']
66

77
jobs:
88
commitlint:
99
name: Commit Naming
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
with:
14-
fetch-depth: 0
15-
- uses: actions/setup-node@v2
16-
- run: npm ci
17-
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 18
18+
cache: npm
19+
- run: npm ci
20+
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
1821
verify_files:
1922
name: Verify Files
2023
runs-on: ubuntu-latest
2124
steps:
22-
- uses: actions/checkout@v2
23-
with:
24-
fetch-depth: 0
25-
- uses: actions/setup-node@v2
26-
- run: npm ci
27-
- run: npm run lint
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 18
31+
cache: npm
32+
- run: npm ci
33+
- run: npm run lint
34+
- run: npm run build # check that build works

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
if: github.repository == 'ydb-platform/ydb-ui-components'
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: yandex-cloud/ui-release-action@main
13-
with:
14-
github-token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
15-
npm-token: ${{ secrets.NODE_AUTH_TOKEN }}
12+
- uses: gravity-ui/release-action@v1
13+
with:
14+
github-token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
15+
npm-token: ${{ secrets.NODE_AUTH_TOKEN }}
16+
node-version: 18

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.vscode
23

34
node_modules
45

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx nano-staged

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.19.0

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
storybook-static
22
build
3+
4+
CHANGELOG.md
5+
CONTRIBUTING.md
6+
package-lock.json

.storybook/decorators/withLang.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import React from 'react';
2-
import {Story as StoryType, StoryContext} from '@storybook/react';
1+
import {configure} from '@gravity-ui/uikit';
2+
import type {StoryContext, StoryFn} from '@storybook/react';
33

4-
import {configure} from '../../src/utils';
5-
6-
export function withLang(Story: StoryType, context: StoryContext) {
4+
export function withLang(Story: StoryFn, context: StoryContext) {
75
const lang = context.globals.lang;
86

97
configure({lang});

0 commit comments

Comments
 (0)