Skip to content

Commit

Permalink
Add files for the OpenAPI dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
w3nl committed Nov 22, 2023
1 parent 06bc08d commit b2057f2
Show file tree
Hide file tree
Showing 32 changed files with 6,522 additions and 504 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
268 changes: 268 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
{
"settings": {
"jsdoc": {
"mode": "typescript"
}
},
"root": true,
"extends": [
"standard",
"plugin:import/recommended",
"plugin:n/recommended",
"plugin:jsdoc/recommended",
"plugin:sonarjs/recommended"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest"
},
"globals": {
"fetch": false,
"FormData": false,
"Headers": false,
"Request": false,
"Response": false
},
"env": {
"es2022": true,
"node": true,
"browser": true,
"worker": true,
"mongo": true,
"serviceworker": true,
"webextensions": true
},
"rules": {
"block-scoped-var": "error",
"complexity": [
"error",
{
"max": 20
}
],
"consistent-return": "error",
"max-classes-per-file": [
"error",
1
],
"max-params": [
"warn",
5
],
"max-depth": [
"warn",
4
],
"max-statements": [
"warn",
20
],
"linebreak-style": [
"warn",
"unix"
],
"class-methods-use-this": "off",
"no-alert": "error",
"no-caller": "error",
"no-extra-label": "error",
"no-labels": [
"error",
{
"allowLoop": false,
"allowSwitch": false
}
],
"no-loop-func": "error",
"no-prototype-builtins": "off",
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
"no-return-await": "error",
"no-else-return": [
"error",
{
"allowElseIf": false
}
],
"no-multi-assign": [
"error"
],
"arrow-body-style": [
"error",
"as-needed"
],
"no-console": "warn",
"no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsFor": [
"acc",
"accumulator",
"e",
"req",
"request",
"res",
"response"
]
}
],
"no-useless-concat": "error",
"no-nested-ternary": "error",
"no-shadow": [
"error",
{
"hoist": "all",
"allow": [
"resolve",
"reject",
"done",
"next",
"err",
"error"
]
}
],
"radix": "error",
"import/prefer-default-export": "off",
"import/no-unresolved": [
"error",
{
"caseSensitive": true
}
],
"import/named": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-mutable-exports": "error",
"import/order": [
"error",
{
"groups": [
[
"builtin",
"external",
"internal"
]
]
}
],
"import/no-self-import": "error",
"import/no-cycle": [
"error",
{
"maxDepth": "∞"
}
],
"import/no-useless-path-segments": [
"error",
{
"commonjs": true
}
],
"n/no-unpublished-import": "off",
"n/no-unsupported-features/es-syntax": [
"off",
{}
],
"vars-on-top": "error",
"for-direction": "error",
"getter-return": [
"error",
{
"allowImplicit": true
}
],
"no-await-in-loop": "error",
"no-inner-declarations": "error",
"no-var": "error",
"no-lonely-if": "error",
"prefer-arrow-callback": [
"error",
{
"allowNamedFunctions": false,
"allowUnboundThis": true
}
],
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": true,
"object": false
}
},
{
"enforceForRenamedProperties": false
}
],
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"require-yield": "error",
"operator-assignment": [
"error",
"always"
],
"prefer-object-spread": "error",
"no-delete-var": "error",
"jsdoc/check-access": "off",
"jsdoc/check-alignment": "error",
"jsdoc/check-examples": "off",
"jsdoc/check-indentation": "error",
"jsdoc/check-line-alignment": "off",
"jsdoc/check-param-names": "error",
"jsdoc/check-property-names": "error",
"jsdoc/check-syntax": "off",
"jsdoc/check-tag-names": "error",
"jsdoc/check-types": [
"error",
{
"unifyParentAndChildTypeChecks": true
}
],
"jsdoc/check-values": "error",
"jsdoc/empty-tags": "error",
"jsdoc/implements-on-classes": "error",
"jsdoc/match-description": "off",
"jsdoc/multiline-blocks": "error",
"jsdoc/no-bad-blocks": "off",
"jsdoc/no-defaults": "off",
"jsdoc/no-missing-syntax": "off",
"jsdoc/no-multi-asterisks": "error",
"jsdoc/no-restricted-syntax": "off",
"jsdoc/no-types": "off",
"jsdoc/no-undefined-types": "error",
"jsdoc/require-asterisk-prefix": "off",
"jsdoc/require-description": "off",
"jsdoc/require-description-complete-sentence": "off",
"jsdoc/require-example": "off",
"jsdoc/require-file-overview": "off",
"jsdoc/require-hyphen-before-param-description": "off",
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "error",
"jsdoc/require-param-description": "off",
"jsdoc/require-param-name": "error",
"jsdoc/require-param-type": "error",
"jsdoc/require-property": "error",
"jsdoc/require-property-description": "off",
"jsdoc/require-property-name": "error",
"jsdoc/require-property-type": "error",
"jsdoc/require-returns": "error",
"jsdoc/require-returns-check": "error",
"jsdoc/require-returns-description": "off",
"jsdoc/require-returns-type": "error",
"jsdoc/require-throws": "off",
"jsdoc/require-yields": "error",
"jsdoc/require-yields-check": "error",
"jsdoc/tag-lines": "error",
"jsdoc/valid-types": "warn"
}
}
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: [w3nl]
patreon: w3news
53 changes: 53 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Code scanning - action"

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: "0 4 * * 5"

jobs:
CodeQL-Build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# 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

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
21 changes: 21 additions & 0 deletions .github/workflows/cpd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node Copy Paste Detector

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: npm cpd
run: |
npm ci
npm run cpd
env:
CI: true
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node Lint

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: npm lint
run: |
npm ci
npm run lint
env:
CI: true
Loading

0 comments on commit b2057f2

Please sign in to comment.