Skip to content

Commit 07dffe1

Browse files
authored
Publish v1 package (#1)
1 parent a27dd67 commit 07dffe1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+13995
-1
lines changed

.babelrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"sourceType": "unambiguous",
3+
"presets": [
4+
[
5+
"@babel/preset-env",
6+
{
7+
"targets": {
8+
"chrome": 100
9+
}
10+
}
11+
],
12+
"@babel/preset-typescript",
13+
"@babel/preset-react"
14+
],
15+
"plugins": []
16+
}

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
end_of_line = lf
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.env.example

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

.eslintrc.cjs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
jest: true,
6+
},
7+
extends: [
8+
'plugin:react/recommended',
9+
'airbnb',
10+
'plugin:storybook/recommended',
11+
'prettier',
12+
'plugin:storybook/recommended',
13+
],
14+
parser: '@typescript-eslint/parser',
15+
parserOptions: {
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
ecmaVersion: 'latest',
20+
sourceType: 'module',
21+
},
22+
plugins: [
23+
'react',
24+
'@typescript-eslint',
25+
'typescript-sort-keys',
26+
'unused-imports',
27+
'prettier',
28+
'prefer-arrow',
29+
],
30+
rules: {
31+
'no-param-reassign': 'off',
32+
'consistent-return': 'off',
33+
'react/prop-types': 'off',
34+
'@typescript-eslint/no-unused-vars': 1,
35+
'import/extensions': 'off',
36+
'import/no-extraneous-dependencies': 'off',
37+
'import/no-unresolved': 'off',
38+
'import/prefer-default-export': 'off',
39+
'no-nested-ternary': 'off',
40+
'no-plusplus': 'off',
41+
'no-unused-vars': 'off',
42+
'no-use-before-define': 'off',
43+
'prettier/prettier': 'error',
44+
'react/destructuring-assignment': 'off',
45+
'react/function-component-definition': 'off',
46+
'react/jsx-filename-extension': 'off',
47+
'react/jsx-props-no-spreading': 'off',
48+
'react/require-default-props': 'off',
49+
'typescript-sort-keys/interface': 'error',
50+
'typescript-sort-keys/string-enum': 'error',
51+
'unused-imports/no-unused-imports': 'error',
52+
'prefer-arrow/prefer-arrow-functions': [
53+
'error',
54+
{
55+
disallowPrototype: true,
56+
singleReturnOnly: true,
57+
classPropertiesAllowed: false,
58+
},
59+
],
60+
},
61+
ignorePatterns: ['test/*', 'src/assets/*'],
62+
};

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: lts/*
15+
registry-url: https://registry.npmjs.org/
16+
- run: yarn
17+
- run: yarn build
18+
- run: npm publish --access public
19+
env:
20+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# JetBrains IDE files
9+
.idea/
10+
11+
# testing
12+
/coverage
13+
14+
# production
15+
/dist
16+
dist
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
tsconfig.tsbuildinfo
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env
30+
.env.local
31+
.env.development.local
32+
.env.test.local
33+
.env.production.local
34+
35+
storybook-static

.husky/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
. "$(dirname "$0")/common.sh"
4+
5+
yarn commitlint --edit $1

.husky/common.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
command_exists () {
2+
command -v "$1" >/dev/null 2>&1
3+
}
4+
5+
# Workaround for Windows 10, Git Bash and Yarn
6+
if command_exists winpty && test -t 1; then
7+
exec < /dev/tty
8+
fi

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
. "$(dirname "$0")/common.sh"
4+
5+
yarn lint-staged

0 commit comments

Comments
 (0)