Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.next/
dist/
out/
node_modules/
node_modules/
eslint.base.mjs
10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- run: npm ci
- run: npm run build

- run: node ./scripts/set-package-version.js packages/cli/package.json
- run: node ./scripts/set-package-version.mjs packages/cli/package.json

- name: Publish to the public NPM registry
run: npm publish
Expand All @@ -55,6 +55,6 @@ jobs:
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.com"

# Sanity check to ensure that the package is published and runnable
- run: npx rmoa --help
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,12 @@ apis-guru/

**/tsconfig.tsbuildinfo

.DS_Store
.DS_Store


.nx/cache
.nx/workspace-data

# Next.js
.next
out
8 changes: 8 additions & 0 deletions .syncpackrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// @ts-check

/** @type {import("syncpack").RcFile} */
const config = {
versionGroups: [],
};

module.exports = config;
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.18.0
7 changes: 0 additions & 7 deletions apis-guru.json

This file was deleted.

16 changes: 16 additions & 0 deletions apps/api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import globals from "globals";
import baseConfig from "../../eslint.base.mjs";

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
...baseConfig,
,
{
languageOptions: {
globals: {
...globals.node,
},
},
},
];
30 changes: 13 additions & 17 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@
"test": "mocha",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org zuplo --project rate-my-openapi-api ./dist && sentry-cli sourcemaps upload --org zuplo --project rate-my-openapi-api ./dist"
},
"lint-staged": {
"**/*.{ts,js}": [
"eslint --cache --fix ."
]
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@fastify/cors": "^8.3.0",
"@fastify/multipart": "^8.0.0",
"@google-cloud/storage": "^7.6.0",
"@rate-my-openapi/core": "*",
"@rate-my-openapi/core": "1.18.0",
"@sendgrid/mail": "^7.7.0",
"@sentry/cli": "^2.21.5",
"@sentry/node": "^7.80.1",
Expand All @@ -34,32 +29,33 @@
"@stoplight/spectral-parsers": "^1.0.3",
"@stoplight/spectral-ruleset-bundler": "^1.5.2",
"@zuplo/errors": "^0.0.0",
"dotenv": "^16.3.1",
"dotenv": "^16.4.5",
"fastify": "^4.21.0",
"js-yaml": "^4.1.0",
"posthog-node": "^3.1.1",
"serialize-error": "^11.0.1",
"stacktrace-parser": "^0.1.10",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
},
"devDependencies": {
"@types/chai": "^4.3.9",
"@types/js-yaml": "^4.0.5",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.0",
"@types/node": "^20.14.11",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"chai": "^4.3.10",
"eslint": "^8.46.0",
"eslint-config-prettier": "^9.0.0",
"mocha": "^10.0.0",
"nodemon": "^3.0.1",
"openapi-types": "^12.1.3",
"p-queue": "^7.4.1",
"p-retry": "^6.1.0",
"pino": "^8.16.2",
"pino-pretty": "^10.2.3",
"prettier": "^3.0.2"
"pino": "^9.3.1",
"pino-pretty": "^11.2.1",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.2",
"@types/node": "^20.17.5",
"typescript": "^5.3.3",
"typescript-eslint": "^8.12.2",
"prettier": "^3.2.5"
}
}
8 changes: 4 additions & 4 deletions apps/api/src/lib/validate-openapi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import spectralCore, { Document } from "@stoplight/spectral-core";
import SpectralParsers from "@stoplight/spectral-parsers";
import { ProblemDetails, Problems } from "@zuplo/errors";
import { load } from "js-yaml";
import { OpenApiFileExtension } from "./types.js";
import spectralCore, { Document } from "@stoplight/spectral-core";
import SpectralParsers from "@stoplight/spectral-parsers";

export const checkFileIsJsonOrYaml = (
fileContentString: string,
Expand All @@ -17,7 +17,7 @@ export const checkFileIsJsonOrYaml = (
try {
load(fileContentString);
return "yaml";
} catch (err) {
} catch (_err) {
// Ignore
}

Expand All @@ -43,7 +43,7 @@ const validateOpenapi = (options: {
parser as SpectralParsers.IParser,
options.fileExtension,
);
} catch (err) {
} catch (_err) {
return {
isValid: false,
error: {
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function logMethod(

return method.apply(this, args);
}
} catch (err) {
} catch (_err) {
// do nothing
}

Expand Down Expand Up @@ -208,7 +208,7 @@ export function createNewLogger(
function: stack[0].methodName,
};
}
} catch (err) {
} catch (_err) {
// ignore
}
}
Expand Down
1 change: 0 additions & 1 deletion apps/api/test.md

This file was deleted.

12 changes: 6 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@headlessui/react": "^1.7.17",
"@heroicons/react": "^2.0.18",
"@monaco-editor/react": "^4.6.0",
"@rate-my-openapi/core": "*",
"@rate-my-openapi/core": "1.18.0",
"@sentry/nextjs": "^7.81.0",
"@tailwindcss/typography": "^0.5.10",
"@typeform/embed-react": "^3.8.0",
Expand All @@ -31,18 +31,18 @@
"devDependencies": {
"@stoplight/spectral-core": "^1.18.3",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.14.11",
"@types/node": "^20.17.5",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"autoprefixer": "^10.4.16",
"eslint": "^8.54.0",
"eslint": "^8.57.1",
"eslint-config-next": "^14.0.3",
"eslint-config-prettier": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"openapi-types": "^12.1.3",
"postcss": "^8.4.31",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.3.5"
}
}
25 changes: 25 additions & 0 deletions eslint.base.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import pluginJs from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import tseslint from "typescript-eslint";

/** @type {import('eslint').Linter.Config[]} */
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
},
},
];
25 changes: 25 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"dev": {
"dependsOn": ["^dev"]
},
"build": {
"dependsOn": ["^build"],
"cache": true
},
"test": {
"dependsOn": ["^test"]
}
},
"defaultBase": "main",
"plugins": [
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
}
],
"nxCloudId": "6725edff0209df6c1f4f34a4"
}
Loading