Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Jul 4, 2023
0 parents commit 36e020f
Show file tree
Hide file tree
Showing 27 changed files with 16,334 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/node_modules/*
**/lib/*
*.ejs
40 changes: 40 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
root: true,
extends: [
'prettier',
'plugin:prettier/recommended',
'@lomray/eslint-config'
],
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',
'no-await-in-loop': 'off',
'prettier/prettier': [
'error',
{
endOfLine: 'auto'
}
]
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
24 changes: 24 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check PR

on:
pull_request:
branches: [ prod ]

jobs:
check:
name: Check PR
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Check eslint
run: npm run lint:check

- name: Typescript check
run: npm run ts:check
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
push:
branches:
- prod
jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Run check typescript
run: npm run ts:check

- name: Run eslint
run: npm run lint:check

- name: Build
run: |
npm pkg delete scripts.prepare
npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
31 changes: 31 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sonarqube

on:
push:
branches: [ prod ]
pull_request:
types: [opened, synchronize, reopened]

jobs:
sonarcube:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-sonarcube
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- id: package-version
name: Get npm package version
run: npx @lomray/microservices-cli package-version

- uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }}
with:
args: >
-Dsonar.projectVersion=${{ steps.package-version.outputs.version }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
logs
*.log
npm-debug.log*
.DS_Store
.idea

.nyc_output
coverage
node_modules
build
lib
cache
.env.*
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint -g commitlint.config.js --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'*.ts': [
'eslint --max-warnings=0',
'prettier --write',
]
}
20 changes: 20 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
__tests__
__helpers__
src
coverage
*.tgz
.github
.husky
.idea
.gitattributes
.editorconfig
.eslintignore
.eslintrc.js
.lintstagedrc.js
commitlint.config.js
rollup.config.js
.prettierrc.js
sonar-project.properties
tsconfig.json
release.config.js
typings
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.13.0
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('@lomray/prettier-config'),
};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Lomray Software

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# React meta tags manager with SSR and Suspense support

![npm](https://img.shields.io/npm/v/@lomray/react-head-manager)
![GitHub](https://img.shields.io/github/license/Lomray-Software/react-head-manager)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=react-head-manager&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=react-head-manager)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=react-head-manager&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=react-head-manager)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=react-head-manager&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=react-head-manager)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=react-head-manager&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=react-head-manager)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=react-head-manager&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=react-head-manager)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=react-head-manager&metric=coverage)](https://sonarcloud.io/summary/new_code?id=react-head-manager)

## Getting started

The package is distributed using [npm](https://www.npmjs.com/), the node package manager.

```
npm i --save @lomray/react-head-manager
```

## Bugs and feature requests

Bug or a feature request, [please open a new issue](https://github.com/Lomray-Software/react-head-manager/issues/new).

## License
Made with 💚

Published under [MIT License](./LICENSE).
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
Loading

0 comments on commit 36e020f

Please sign in to comment.