Skip to content

Commit

Permalink
chore(stand): new stand and new builder (#21)
Browse files Browse the repository at this point in the history
* chore(stand): new stand and new builder
* docs(documentation): add doc for  rc-tree-adapter stand (#22)
* docs: add image, start, edit docs (#23)
* Docs/sandbox (#25)
* docs(documentation): add doc for  rc-tree-adapter stand
* docs(sandbox): add sanboxes links
* fix(sandbox): rewrite links to ids
* Update yarn.lock
* Update RcTree.dev.stand.mdx
* feat(variants): add variants for rc-tree-adapter (#26)
* docs: change components versions (#27)
* chore(deps): update @consta/uikit

Co-authored-by: arhayka <arhayka@gmail.com>
Co-authored-by: N1MBER <socialfox33@gmail.com>
  • Loading branch information
3 people authored Sep 29, 2022
1 parent c4ef678 commit 55c07cd
Show file tree
Hide file tree
Showing 118 changed files with 14,041 additions and 14,869 deletions.
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
root = true

[*]
indent_size = 2
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
20 changes: 10 additions & 10 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
build
lib
node_modules
scripts
types
webpack
babel.config.js
jest.config.js
postcss.config.js
*.css.d.ts
!/.storybook
node_modules/*
build/*
dist/*
builder/*
scripts/*
build.config.js
repos/*
.husky/*
.github/*
119 changes: 106 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,124 @@
module.exports = {
extends: [require.resolve('@consta/widgets-configs/eslintrc')],
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
extends: [
'airbnb',
'airbnb/hooks',
'react-app',
'react-app/jest',
'prettier',
'plugin:prettier/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
createDefaultProgram: true,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2019,
sourceType: 'module',
project: './tsconfig.json',
},
plugins: [
'import',
'jsx-a11y',
'react-hooks',
'@typescript-eslint',
'simple-import-sort',
'prettier',
],
overrides: [
{
files: ['./src/**/*.stories.tsx'],
files: '*.js',
rules: {
'import/no-default-export': ['off'],
'@typescript-eslint/no-shadow': ['off'],
'@typescript-eslint/no-var-requires': 'off',
},
},
],
plugins: ['todo-plz'],
rules: {
'todo-plz/ticket-ref': [
'testing-testing-library/prefer-screen-queries': 'off',
'testing-library/no-unnecessary-act': 'off',
'testing-library/render-result-naming-convention': 'off',
'testing-library/no-node-access': 'off',
'testing-library/no-container': 'off',
'testing-library/prefer-screen-queries': 'off',
'testing-library/prefer-presence-queries': 'off',
'jest/no-conditional-expect': 'off',
'jest/no-mocks-import': 'off',
'jest/no-identical-title': 'off',
'jest/valid-expect': 'off',
'react/no-unstable-nested-components': 'off',
'default-param-last': 'off',
'prettier/prettier': [
'error',
{},
{
pattern: '(GDC-|UI-Kit#)[0-9]+',
terms: ['TODO', 'todo'],
usePrettierrc: true,
},
],
'func-names': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'quote-props': ['error', 'consistent-as-needed'],
'react/prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
'react/jsx-props-no-spreading': 'off',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/require-extension': 'off',
'sort-imports': 'off',
'import/export': 'off',
'import/named': 'off',
'import/order': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'simple-import-sort/imports': 'error',
'import/no-cycle': 'off',
'no-unused-vars': 'error',
'no-restricted-syntax': 'off',
'consistent-return': 'off',
'no-unused-expressions': 'off',
'react/no-array-index-key': 'off',
'no-shadow': 'off',
'no-plusplus': 'off',
'react-hooks/exhaustive-deps': 'off',
'default-case': 'off',
'no-continue': 'off',
'for-direction': 'off',
'no-constant-condition': 'off',
'react/require-default-props': 'off',
'no-param-reassign': 'off',
'react/function-component-definition': 'off',
'react/no-unused-prop-types': 'off',
'jsx-a11y/label-has-associated-control': [
'error',
{
required: {
some: ['nesting', 'id'],
},
},
],
'@typescript-eslint/ban-types': ['off'],
'@typescript-eslint/tslint/config': [
'jsx-a11y/label-has-for': [
'error',
{
rules: {
'no-array-mutation': false,
required: {
some: ['nesting', 'id'],
},
},
],
},
}
};
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* @gizeasy @N1MBER
*.md @arhayka @linturaven
*.mdx @arhayka @linturaven
*.css @linturaven
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Описание изменений

## Чек-лист

- [ ] PR: направлен в правильную ветку
- [ ] PR: назначен исполнитель PR и указаны нужные лейблы
- [ ] PR: проверен diff, ничего лишнего в PR не попало
- [ ] PR: прилинкованы затронутые issue и связанные PR
- [ ] PR: есть описание изменений
- [ ] JS: нет варнингов и ошибок в консоли браузера
- [ ] Тесты: новый функционал и исправленные баги покрыты тестами
- [ ] Документация: отражены все изменения в API компонентов и описаны важные особенности реализации или использования
- [ ] Сторибук: для компонентов написаны или обновлены stories
- [ ] Верстка: используются [переменные](../src/components/Theme)
- [ ] Верстка: проверена с разным количеством контента

## Опционально

- [ ] Доработки: заведены задачи для дальнейшей работы, если что-то решено не править в текущем пулл-реквесте
- [ ] Коммиты: проименованы в соответствии с [правилами](https://consta-uikit.vercel.app/?path=/docs/common-develop-commits-style--page)
9 changes: 5 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ name: Deploy

on:
push:
branches: master
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize

env:
BUILD_SCRIPT: yarn build:storybook
BUILD_SCRIPT: yarn stand:build
BUILD_SCRIPT_OUTPUT: build
APP_NAME: rc-tree-adapter

Expand All @@ -23,12 +24,12 @@ jobs:
# Устанавливаем Node.JS для сборки приложения
- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '16'

- name: Install yarn
id: yarn-setup
run: |
yarn policies set-version 1.19.1
yarn policies set-version 1.22.18
echo "::set-output name=cache_dir::$(yarn cache dir)"
- name: Настройка кэширования yarn
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/publish-stand.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests
on:
push:
branches: master
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.2.2
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16

- name: Установка yarn
id: yarn-setup
run: |
yarn policies set-version 1.22.18
echo "::set-output name=cache_dir::$(yarn cache dir)"
- name: Настройка кэширования yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-setup.outputs.cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Установка зависимостей
run: yarn --frozen-lockfile
- name: Тесты
run: yarn test
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
Expand All @@ -8,12 +7,17 @@ node_modules

# testing
/coverage
/repos
__diff_output__

# production
/build
/dist
/lib

# misc
.idea
.vscode
.DS_Store
.env.local
.env.development.local
Expand All @@ -23,3 +27,8 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.code-workspace
package-lock.json
build-storybook.log
.yarn/
.yarnrc
2 changes: 1 addition & 1 deletion .grenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ module.exports = {
release: '## {{release}} ({{date}})\n{{body}}',
releaseSeparator: '\n--------------------\n\n',
},
}
};
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run pre-commit
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run pre-push
4 changes: 4 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

exec < /dev/tty && npx cz --hook || true
6 changes: 6 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.css": ["stylelint ./src/**/*.css --fix"],
"*.{js,jsx,ts,tsx}": ["eslint --fix"],
"*.{json,md,mdx}": ["prettier --write"],
"*.svg": ["prettier --write --parser html"]
}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@gpn-prototypes:registry=https://npm.pkg.github.com
registry=https://registry.npmjs.org/
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
build/*
dist/*
*.css.d.ts
CHANGELOG.md
CHANGELOG.md
Loading

0 comments on commit 55c07cd

Please sign in to comment.