-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bfe8099
Showing
2,297 changed files
with
29,255 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 0 | ||
|
||
[Makefile] | ||
indent_size = 8 | ||
indent_style = tab | ||
max_line_length = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* eslint-disable sort-keys-fix/sort-keys-fix, @typescript-eslint/naming-convention */ | ||
|
||
const path = require('path') | ||
|
||
const BOOLEAN_CAMEL_PREFIXES = ['can', 'did', 'is', 'had', 'has', 'must', 'should', 'was', 'will', 'with'] | ||
const BOOLEAN_UPPER_PREFIXES = ['CAN_', 'DID_', 'IS_', 'HAD_', 'HAS_', 'MUST_', 'SHOULD_', 'WAS_', 'WILL_', 'WITH_'] | ||
|
||
module.exports = { | ||
extends: '@ivangabriele/eslint-config-typescript-react', | ||
env: { | ||
browser: true, | ||
node: false | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
project: path.join(__dirname, 'tsconfig.json') | ||
}, | ||
ignorePatterns: [ | ||
'/config/', | ||
'/dist/', | ||
'/scripts/', | ||
'/storybook-static/', | ||
'.eslintrc.js', | ||
'postcss.config.js', | ||
'rollup.config.js' | ||
], | ||
rules: { | ||
// We must add PascalCase in formats because ESLint trim the prefix before evaluating the case | ||
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md#format-options | ||
// > Note: As documented above, the prefix is trimmed before format is validated, | ||
// > therefore PascalCase must be used to allow variables such as isEnabled using the prefix is. | ||
'@typescript-eslint/naming-convention': [ | ||
'warn', | ||
{ | ||
selector: 'variable', | ||
format: ['camelCase', 'PascalCase', 'UPPER_CASE'] | ||
}, | ||
{ | ||
selector: 'function', | ||
format: ['camelCase', 'PascalCase'] | ||
}, | ||
{ | ||
selector: 'typeLike', | ||
format: ['PascalCase'], | ||
filter: { | ||
regex: '^LEGACY_', | ||
match: false | ||
} | ||
}, | ||
{ | ||
selector: 'accessor', | ||
types: ['boolean'], | ||
format: ['camelCase', 'PascalCase'], | ||
prefix: BOOLEAN_CAMEL_PREFIXES | ||
}, | ||
{ | ||
selector: 'classProperty', | ||
types: ['boolean'], | ||
format: ['camelCase', 'PascalCase'], | ||
prefix: BOOLEAN_CAMEL_PREFIXES | ||
}, | ||
{ | ||
selector: 'objectLiteralProperty', | ||
types: ['boolean'], | ||
format: ['camelCase', 'PascalCase'], | ||
prefix: BOOLEAN_CAMEL_PREFIXES | ||
}, | ||
{ | ||
selector: 'parameter', | ||
types: ['boolean'], | ||
format: ['camelCase', 'PascalCase'], | ||
prefix: BOOLEAN_CAMEL_PREFIXES | ||
}, | ||
{ | ||
selector: 'parameterProperty', | ||
types: ['boolean'], | ||
format: ['camelCase', 'PascalCase'], | ||
prefix: BOOLEAN_CAMEL_PREFIXES | ||
}, | ||
{ | ||
selector: 'variable', | ||
types: ['boolean'], | ||
format: ['camelCase', 'PascalCase', 'UPPER_CASE'], | ||
prefix: [...BOOLEAN_CAMEL_PREFIXES, ...BOOLEAN_UPPER_PREFIXES] | ||
} | ||
], | ||
|
||
'@typescript/no-use-before-define': 'off', | ||
|
||
'@typescript-eslint/no-use-before-define': 'off', | ||
|
||
'import/no-extraneous-dependencies': ['error', { peerDependencies: true }], | ||
|
||
'react/jsx-props-no-spreading': 'off', | ||
// See https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/default_props/#you-may-not-need-defaultprops | ||
'react/require-default-props': 'off', | ||
'react/react-in-jsx-scope': 'off' | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['./scripts/**/*.js'], | ||
env: { | ||
browser: false, | ||
node: true | ||
}, | ||
rules: { | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }] | ||
} | ||
}, | ||
{ | ||
files: ['./stories/**/*.stories.tsx'], | ||
rules: { | ||
'no-underscore-dangle': 'off', | ||
|
||
'@typescript-eslint/naming-convention': 'off', | ||
|
||
'import/no-default-export': 'off', | ||
|
||
'sort-keys-fix/sort-keys-fix': 'off' | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# https://github.com/github/linguist/blob/master/docs/overrides.md#overrides | ||
/icons/material/* linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["github>ivangabriele/renovate-config"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Check | ||
|
||
on: push | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 18 | ||
- name: Install | ||
run: yarn | ||
- name: Lint | ||
run: yarn test:lint | ||
|
||
type: | ||
name: Type | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 18 | ||
- name: Install | ||
run: yarn | ||
- name: Type | ||
run: yarn test:type | ||
|
||
test_unit: | ||
name: Unit Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 18 | ||
- name: Install | ||
run: yarn | ||
- name: Test | ||
run: yarn test:unit --coverage | ||
- name: Upload coverage | ||
run: yarn codecov | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 18 | ||
- name: Install | ||
run: yarn | ||
- name: Build | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 16 | ||
- name: Install | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Release | ||
run: yarn semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Get version | ||
id: get_version | ||
run: echo ::set-output name=version::$(npm pkg get version | sed 's/"//g') | ||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
branch: ci-release-v${{ steps.get_version.outputs.version }} | ||
commit-message: "ci(release): ${{ steps.get_version.outputs.version }}" | ||
title: "ci(release): ${{ steps.get_version.outputs.version }}" | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
deploy: | ||
name: Deploy | ||
needs: release | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 16 | ||
- name: Install | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build-storybook | ||
- name: Deploy | ||
run: | | ||
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
npx gh-pages -d storybook-static -u "github-actions-bot <support+actions@github.com>" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.