Skip to content

Commit 7ff6d19

Browse files
feat: introduce initial eslint typescript react config (#1)
* chore: add initial functionality * chore: add missing files * chore: remove codecov from github workflows due to missing tests * style: add missing ending line * chore: add eslint plugins as peer dependencies * chore: remove duplicate peer dependencies that are in txo-typescript dependency * chore: remove unused boilerplate version scripts * chore: remove unused jest config * chore: update yarn lock * chore: remove comments and replace with disable line Co-authored-by: Rostislav Simonik <rostislav.simonik@technologystudio.sk>
1 parent 5095c03 commit 7ff6d19

33 files changed

+8019
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 2
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
15+
16+
[*.gradle]
17+
indent_size = 4

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
commitlint.config.js
2+
jest.config.js
3+
lib
4+
release.config.js

.eslintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./src/index.js",
3+
"rules": {
4+
"prefer-destructuring": "off"
5+
},
6+
"parserOptions": {
7+
"createDefaultProgram": true
8+
}
9+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.github/workflows/code-style.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Code style'
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
jobs:
11+
lint:
12+
name: Lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
cache: 'yarn'
19+
node-version-file: '.nvmrc'
20+
- run: yarn install --frozen-lockfile
21+
- run: yarn lint

.github/workflows/pr.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Ensure semantic PR title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v4
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
persist-credentials: false
16+
- uses: actions/setup-node@v3
17+
with:
18+
cache: 'yarn'
19+
node-version-file: '.nvmrc'
20+
- run: yarn install --frozen-lockfile
21+
- run: yarn test
22+
- run: yarn semantic-release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELASE_GITHUB_TOKEN }}
25+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Test'
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
jobs:
11+
test:
12+
name: Unit tests
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
cache: 'yarn'
19+
node-version-file: '.nvmrc'
20+
- run: yarn install --frozen-lockfile
21+
- run: yarn test

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
.npmrc
5+
6+
# node.js
7+
#
8+
node_modules/
9+
.eslintcache
10+
npm-debug.log
11+
yarn-error.log
12+
lib
13+
coverage

.husky/.gitignore

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

0 commit comments

Comments
 (0)