Skip to content

Commit

Permalink
Merge pull request #109 from batoulapps/develop
Browse files Browse the repository at this point in the history
v4.4.0
  • Loading branch information
z3bi authored May 11, 2022
2 parents e2465bb + 101192a commit 54d1c46
Show file tree
Hide file tree
Showing 77 changed files with 15,739 additions and 23,287 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/coverage
/lib
/Shared
45 changes: 35 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
module.exports = {
parser: '@typescript-eslint/parser',

parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
project: ['./tsconfig.json'],
sourceType: 'module',
},

extends: ["eslint:recommended", "plugin:jest/recommended"],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:prettier/recommended',
],

overrides: [
{
files: ['*.js'],
parser: null,
parserOptions: { project: null },
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
},
},
],

env: {
node: true,
browser: true,
"jest/globals": true,
'jest/globals': true,
},

rules: {
"complexity": ["warn", 10],
"max-lines": ["warn", 300],
"max-params": ["warn", 5],
"eqeqeq": ["error", "smart"],
"no-var": "error",
"prefer-const": "error",
"object-shorthand": "error",
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-unnecessary-condition': 'warn',
complexity: ['warn', 10],
'max-lines': ['warn', 300],
'max-params': ['warn', 5],
eqeqeq: ['error', 'smart'],
'no-var': 'error',
'prefer-const': 'error',
'object-shorthand': 'error',
},

plugins: ['@typescript-eslint', 'jest'],
};
14 changes: 7 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: 'CodeQL'

on:
push:
Expand All @@ -12,7 +12,7 @@ on:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: "0 5 * * 2"
- cron: '0 5 * * 2'

jobs:
analyze:
Expand All @@ -24,17 +24,17 @@ jobs:
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ["javascript"]
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -45,7 +45,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -59,4 +59,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
103 changes: 0 additions & 103 deletions .github/workflows/node.js.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
'on':
push:
branches:
- master
- next
- beta
- '*.x'
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 6 additions & 10 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"
- cron: '30 1 * * *'

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test
'on':
push:
branches:
- master
- renovate/**
pull_request:
types:
- opened
- synchronize
jobs:
test_matrix:
strategy:
matrix:
node-version: [12, 14, 16, 17]
os:
- ubuntu-latest
runs-on: '${{ matrix.os }}'
steps:
- uses: actions/checkout@v3
- name: 'Use Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v3
with:
node-version: '${{ matrix.node-version }}'
cache: npm
- run: npm ci
- run: npm run test
coverage:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: ./coverage
build:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ coverage/
.idea
.vscode/
.env
lib/
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 pretty-quick --staged
16 changes: 11 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
test/
.github/
.husky/
coverage/
scripts/
Shared/
src/
test/
coverage/
*.config.js
.nvmrc
.eslint*
.prettier*
.releaserc.json
example.html
.travis.yml
jest.config.js
babel.config.js
webpack.config.js
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/lib
/Shared
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"endOfLine": "lf",
"tabWidth": 2,
"arrowParens": "always",
"bracketSpacing": true,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
Loading

0 comments on commit 54d1c46

Please sign in to comment.