-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 f3c813b
Showing
29 changed files
with
17,925 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,13 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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 @@ | ||
**/node_modules/* | ||
**/dist/* | ||
*.ejs |
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,40 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'prettier', | ||
'plugin:prettier/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'@lomray/eslint-config-react' | ||
], | ||
ignorePatterns: ['/*.*', 'src/@types'], | ||
plugins: [], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
serviceworker: true, | ||
}, | ||
globals: { | ||
NodeJS: true, | ||
JSX: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
files: ['*.ts', '*.tsx'], | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: './', | ||
}, | ||
rules: { | ||
'unicorn/import-index': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
endOfLine: 'auto' | ||
} | ||
] | ||
} | ||
} |
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,34 @@ | ||
name: Check PR | ||
|
||
on: | ||
pull_request: | ||
branches: [ staging, prod ] | ||
|
||
jobs: | ||
check: | ||
name: Check PR | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Check prettier | ||
run: npm run prettier:check | ||
|
||
- name: Check eslint | ||
run: npm run lint:check | ||
|
||
- name: Typescript check | ||
run: npm run ts:check | ||
|
||
- uses: naveenk1223/action-pr-title@master | ||
with: | ||
regex: '^(feat|fix|perf|refactor|revert|test|test|build|chore)([(a-z-)]*):\s[a-z0-9\s,()]+$' # Regex the title should match. | ||
prefix_case_sensitive: true | ||
min_length: 10 | ||
max_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,31 @@ | ||
name: Build & Publish | ||
|
||
on: | ||
push: | ||
branches: [ prod, staging ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build package | ||
run: npm run build | ||
|
||
- name: Publish npm packages / create github release | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,20 @@ | ||
name: Sonarqube | ||
on: | ||
push: | ||
branches: [ staging ] | ||
|
||
jobs: | ||
sonarcube: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.ref }}-sonarcube | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: sonarsource/sonarqube-scan-action@master | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
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,4 @@ | ||
.idea | ||
.DS_Store | ||
node_modules | ||
lib |
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,20 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# validate commit | ||
npx --no-install commitlint -g commitlint.config.js --edit "$1" | ||
|
||
LC_ALL=C | ||
|
||
local_branch="$(git rev-parse --abbrev-ref HEAD)" | ||
|
||
valid_branch_regex="^(feature|bugfix|improvement|hotfix)\/[a-z0-9-]+$" | ||
|
||
message="There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex. Your commit will be rejected. You should rename your branch to a valid name and try again." | ||
|
||
# validate branch name | ||
# shellcheck disable=SC2039 | ||
if [ ! $local_branch =~ $valid_branch_regex ] && [ ! "$local_branch" == "staging" ] && [ ! "$local_branch" == "prod" ]; then | ||
echo "$message" | ||
exit 1 | ||
fi |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,6 @@ | ||
module.exports = { | ||
'*.{ts,tsx}': [ | ||
'eslint --max-warnings=0', | ||
'prettier --write', | ||
] | ||
} |
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,17 @@ | ||
workflows | ||
.gitignore | ||
.github | ||
commitlint.config.js | ||
release.config.js | ||
rollup.config.js | ||
.eslintignore | ||
.eslintrc.js | ||
.lintstagedrc.js | ||
.prettierrc.js | ||
sonar-project.properties | ||
.husky | ||
.idea | ||
.editorconfig | ||
/index.ts | ||
/src | ||
tsconfig.json |
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 @@ | ||
module.exports = { | ||
...require('@lomray/prettier-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,9 @@ | ||
# Mobx stores manager for React | ||
|
||
## Usage | ||
|
||
1. Install package: | ||
|
||
```sh | ||
npm i --save-dev @lomray/react-mobx-manager | ||
``` |
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 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
}; |
Oops, something went wrong.