Skip to content

Commit

Permalink
Merge 28da843 into 6239e8f
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedLamineAllal committed Mar 18, 2023
2 parents 6239e8f + 28da843 commit 766f782
Show file tree
Hide file tree
Showing 482 changed files with 24,052 additions and 47,882 deletions.
4 changes: 4 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json.schemastore.org/commitlintrc.json",
"extends": ["@commitlint/config-conventional"]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rollup.config.mjs
89 changes: 89 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["plugin:prettier/recommended", "airbnb-base"],
"plugins": ["prettier"],
"rules": {
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": false }
],
"import/no-cycle": "warn",
"class-methods-use-this": "off",
"import/prefer-default-export": "off",
"comma-dangle": "off",
"no-underscore-dangle": "off",
"no-prototype-builtins": "off",
"object-curly-newline": "off",
"operator-linebreak": "off",
"implicit-arrow-linebreak": "off",
"function-paren-newline": "off",
"import/no-extraneous-dependencies": "off"
},
"overrides": [
{
"files": ["src/**/*.ts", "*.ts"],
"extends": [
"plugin:@typescript-eslint/recommended",
"airbnb-base",
"airbnb-typescript/base"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"],
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": false }
],
"import/no-cycle": "warn",
"class-methods-use-this": "off",
"import/prefer-default-export": "off",
"comma-dangle": "off",
"no-underscore-dangle": "off",
"no-prototype-builtins": "off",
"object-curly-newline": "off",
"operator-linebreak": "off",
"implicit-arrow-linebreak": "off",
"function-paren-newline": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-loop-func": "off"
}
},
{
"files": ["./jest.config.ts"],
"parserOptions": {
"project": ["./jest.tsconfig.json"],
"ecmaVersion": "latest",
"sourceType": "module"
}
},
{
"files": ["e2e-tests/**/*.ts"],
"parserOptions": {
"project": ["./e2e-tests.tsconfig.json"],
"ecmaVersion": "latest",
"sourceType": "module"
}
},
{
"files": ["e2e-tests/**/*.test.js"],
"env": {
"jest": true,
"jasmine": true
}
}
]
}
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:

env:
FORCE_COLOR: 2
NODE_COV: 16 # The Node.js version to run coveralls on

permissions:
contents: read

jobs:
run:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node:
- 14
- 16
- 18

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: latest

- name: Set up Node.js
uses: actions/setup-node@v3.5.0
with:
node-version: '${{ matrix.node }}'
cache: 'pnpm'

- name: Install npm dependencies
run: pnpm install

- name: Build dist
run: npm run build

- name: Run test
run: npm run test
if: matrix.node != env.NODE_COV

- name: Run test with coverage
run: npm run test:cov
if: matrix.node == env.NODE_COV

- name: Run Coveralls
uses: coverallsapp/github-action@1.1.3
if: matrix.node == env.NODE_COV
continue-on-error: true
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'CodeQL'

on:
push:
branches:
- main
- '!dependabot/**'
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
- '!dependabot/**'
schedule:
- cron: '0 0 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'javascript'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:

env:
FORCE_COLOR: 2
NODE: 16

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: latest

- name: Set up Node.js
uses: actions/setup-node@v3.5.0
with:
node-version: '${{ env.NODE }}'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Run lint
run: npm run lint
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.history
/node_modules/
package-lock.json
.history/
node_modules/
dist/
garbage/
test_space/
coverage/
mix-manifest.json
.DS_Store
3 changes: 0 additions & 3 deletions .jshintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "all"
}
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"cSpell.words": [
"Pids"
],
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading

0 comments on commit 766f782

Please sign in to comment.