Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit 26ed831

Browse files
authored
chore: cleanup (#256)
* docs(readme): use typescript * chore: add prettier * chore: fix prettier issues * chore: update lockfile version * chore: seperate prettier from eslint * chore: extend eslint file types * chore: revert lockfile to version 1 * chore: update deps
1 parent e5883cc commit 26ed831

14 files changed

+3793
-6036
lines changed

.editorconfig

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ end_of_line = lf
99

1010
[*.md]
1111
trim_trailing_whitespace = false
12+
indent_style = space
1213

1314
[.github/**/*]
1415
indent_style = space

.eslintrc

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
"eslint:recommended",
44
"plugin:react/recommended",
55
"plugin:@typescript-eslint/recommended",
6-
"plugin:prettier/recommended"
7-
],
8-
"plugins": [
9-
"react",
10-
"@typescript-eslint",
116
"prettier"
127
],
8+
"plugins": ["react", "@typescript-eslint"],
139
"env": {
1410
"browser": true,
1511
"jest": true

.github/ISSUE_TEMPLATE/bug_report.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
3840
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/empty.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: Empty Issue
33
about: Create an empty issue without boilerplate
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---

.github/ISSUE_TEMPLATE/feature_request.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/codeql-analysis.yml

+30-30
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main, beta ]
16+
branches: [main, beta]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main ]
19+
branches: [main]
2020
schedule:
21-
- cron: '28 3 * * 5'
21+
- cron: "28 3 * * 5"
2222

2323
jobs:
2424
analyze:
@@ -32,41 +32,41 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'javascript' ]
35+
language: ["javascript"]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3737
# Learn more:
3838
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3939

4040
steps:
41-
- name: Checkout repository
42-
uses: actions/checkout@v3
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
4343

44-
# Initializes the CodeQL tools for scanning.
45-
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v2
47-
with:
48-
languages: ${{ matrix.language }}
49-
config-file: ./.github/codeql/codeql-config.yml
50-
# If you wish to specify custom queries, you can do so here or in a config file.
51-
# By default, queries listed here will override any specified in a config file.
52-
# Prefix the list here with "+" to use these queries and those in the config file.
53-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
config-file: ./.github/codeql/codeql-config.yml
50+
# If you wish to specify custom queries, you can do so here or in a config file.
51+
# By default, queries listed here will override any specified in a config file.
52+
# Prefix the list here with "+" to use these queries and those in the config file.
53+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5454

55-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56-
# If this step fails, then you should remove it and run the build manually (see below)
57-
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v2
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v2
5959

60-
# ℹ️ Command-line programs to run using the OS shell.
61-
# 📚 https://git.io/JvXDl
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 https://git.io/JvXDl
6262

63-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
64-
# and modify them (or add more) to build your code if your project
65-
# uses a compiled language
63+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
64+
# and modify them (or add more) to build your code if your project
65+
# uses a compiled language
6666

67-
#- run: |
68-
# make bootstrap
69-
# make release
67+
#- run: |
68+
# make bootstrap
69+
# make release
7070

71-
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v2

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
docs
4+
CHANGELOG.md

.storybook/main.js

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
module.exports = {
2-
stories: ['../stories/**/*.stories.tsx'],
3-
addons: [{
4-
name: '@storybook/addon-essentials',
5-
options: {
6-
actions: false
7-
}
8-
}],
2+
stories: ["../stories/**/*.stories.tsx"],
3+
addons: [
4+
{
5+
name: "@storybook/addon-essentials",
6+
options: {
7+
actions: false,
8+
},
9+
},
10+
],
911
typescript: {
1012
check: false,
1113
checkOptions: {},
12-
reactDocgen: 'react-docgen-typescript',
14+
reactDocgen: "react-docgen-typescript",
1315
reactDocgenTypescriptOptions: {
1416
shouldExtractLiteralValuesFromEnum: true,
15-
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
17+
propFilter: (prop) =>
18+
prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
1619
},
1720
},
1821
};

.storybook/preview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const parameters = {
2-
layout: 'padded',
2+
layout: "padded",
33
};

CONTRIBUTING.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing
22

33
When contributing to this repository, please first discuss the change you wish to make via issue,
4-
email, or any other method with the owners of this repository before making a change.
4+
email, or any other method with the owners of this repository before making a change.
55

66
## Pull Request Process
77

@@ -10,35 +10,35 @@ email, or any other method with the owners of this repository before making a ch
1010
3. Make sure to have the latest dependencies installed via `npm install`.
1111
4. Do your changes and write clear commit messages following our conventions (see previous commits or `commitlint.config.js`).
1212
5. Test your changes and make sure `npm run lint` passes with no errors. ;)
13-
6. Update the `CHANGELOG.md` according to your change.
13+
6. Update the `CHANGELOG.md` according to your change.
1414
7. Update the `README.md` if needed.
1515
8. Push your changes and submit a pull request and mention the issue inside the pull request body.
1616

1717
## Issue Process
1818

19-
When Opening an issue please keep in mind that we might not be able to support
20-
every feature request as we tend to make this project as easy to use and
19+
When Opening an issue please keep in mind that we might not be able to support
20+
every feature request as we tend to make this project as easy to use and
2121
flexible as possible.
2222

2323
Please provide as much detail to your issues as possible.
2424
If some parts of the templates doesn't fit to your issue simply delete it.
2525

2626
## Build process
2727

28-
We have npm scripts which are the source for every build step or anything similar
29-
like building the distribution file, creating the storybook files, starting the
28+
We have npm scripts which are the source for every build step or anything similar
29+
like building the distribution file, creating the storybook files, starting the
3030
storybook server, linting and so on.
3131

3232
The targets meant to be used are:
3333

34-
| Target | Description |
35-
| ------------- |:--------------|
36-
| `build` | builds all distribution files |
37-
| `build-storybook` | builds the storybook files to the `docs` folder |
38-
| `storybook` | starts the storybook development server on port 6006 |
39-
| `lint` | runs `eslint` with plugins |
40-
| `lint-fix` | runs the automatic fixer of `eslint` |
41-
| `clean` | cleans all generated files i.e. `node_modules` and `dist` |
34+
| Target | Description |
35+
| ----------------- | :-------------------------------------------------------- |
36+
| `build` | builds all distribution files |
37+
| `build-storybook` | builds the storybook files to the `docs` folder |
38+
| `storybook` | starts the storybook development server on port 6006 |
39+
| `lint` | runs `eslint` with plugins |
40+
| `lint-fix` | runs the automatic fixer of `eslint` |
41+
| `clean` | cleans all generated files i.e. `node_modules` and `dist` |
4242

4343
You can see all targets which meant to be used from the developer in the `package.json` under the `script` section.
4444
If you encounter any problem try to run `npm run clean` at first.
@@ -48,4 +48,5 @@ If you encounter any problem try to run `npm run clean` at first.
4848
Each push to the `main` branch will build a new version. [semantic-release](https://github.com/semantic-release/semantic-release) creates a changelog, increases the version number, creates a git tag, a github release and deploys it to npm.
4949

5050
### pre-release
51+
5152
To create a pre-release just push changes to the `beta` branch. This will deploy a beta version (e.g. `1.2.5-beta1`) and publish it as a pre-release on npm.

0 commit comments

Comments
 (0)