Skip to content

Commit

Permalink
[javascript] Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunyel committed Jan 29, 2024
1 parent 484d8e0 commit 84d4267
Show file tree
Hide file tree
Showing 13 changed files with 1,542 additions and 2,835 deletions.
87 changes: 0 additions & 87 deletions javascript/.eslintrc.js

This file was deleted.

4 changes: 0 additions & 4 deletions javascript/.prettierrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions javascript/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"trailingComma": "es5",
"printWidth": 90
}
102 changes: 102 additions & 0 deletions javascript/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
const js = require("@eslint/js");
const typescriptParser = require("@typescript-eslint/parser");
const eslintPluginTypescriptEslint = require("@typescript-eslint/eslint-plugin");
const eslintConfigPrettier = require("eslint-config-prettier");
const globals = require("globals");

module.exports = [
js.configs.recommended,
eslintConfigPrettier,
{
files: ["src/**/*.ts"],
languageOptions: {
parser: typescriptParser,
globals: {
...globals.browser,
},
},
plugins: { "@typescript-eslint": eslintPluginTypescriptEslint },
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: {
delimiter: "semi",
requireLast: true,
},
singleline: {
delimiter: "semi",
requireLast: false,
},
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
vars: "all",
args: "all",
ignoreRestSiblings: true,
argsIgnorePattern: "^_",
},
],

quotes: "off",
"@typescript-eslint/quotes": [
"error",
"double",
{ allowTemplateLiterals: true, avoidEscape: true },
],
semi: "off",
"@typescript-eslint/semi": ["error", "always", { omitLastInOneLineBlock: true }],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
},
],
"comma-spacing": ["error"],
eqeqeq: ["error", "smart"],
indent: "off",
"@typescript-eslint/indent": 0,
"no-multi-spaces": "error",
"object-curly-spacing": ["error", "always"],
"arrow-parens": "error",
"arrow-spacing": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"func-call-spacing": "off",
"@typescript-eslint/func-call-spacing": ["error"],
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always",
},
],
"space-in-parens": ["error", "never"],
"space-before-blocks": "error",
curly: ["error", "all"],
"space-infix-ops": "error",
"consistent-return": "error",
"jsx-quotes": ["error"],
"array-bracket-spacing": "error",
"brace-style": "off",
"@typescript-eslint/brace-style": ["error", "1tbs", { allowSingleLine: true }],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "warn",
},
},
{
ignores: ["eslint.config.js", "dist/**/*", "**/.*", "src/openapi/*"],
},
];
4 changes: 0 additions & 4 deletions javascript/jest.config.js

This file was deleted.

3 changes: 2 additions & 1 deletion javascript/openapi-generator-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"npmName": "svix",
"useObjectParameters": true,
"supportsES6": true
"supportsES6": true,
"platform": "browser"
}
44 changes: 25 additions & 19 deletions javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,52 @@
"description": "Svix webhooks API client and webhook verification library",
"author": "svix",
"repository": "https://github.com/svix/svix-libs",
"type": "commonjs",
"type": "module",
"keywords": [
"svix",
"diahook",
"webhooks",
"typescript"
],
"license": "MIT",
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"typings": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"files": [
"dist/**/*"
],
"sideEffects": false,
"scripts": {
"build": "tsc",
"build": "tsup src/index.ts",
"prepare": "yarn run build",
"test": "jest",
"test": "vitest run",
"prepublishOnly": "yarn lint",
"lint:eslint": "eslint --ignore-path .lintignore --ext .js,.jsx,.ts,.tsx src",
"lint:eslint": "eslint .",
"lint:prettier": "prettier --ignore-path .lintignore --write src/**.ts",
"lint": "yarn run lint:prettier && yarn run lint:eslint --max-warnings=0",
"lint:fix": "yarn run lint:prettier --write && yarn run lint:eslint --fix"
},
"dependencies": {
"@stablelib/base64": "^1.0.0",
"es6-promise": "^4.2.4",
"js-base64": "^3.7.6",
"fast-sha256": "^1.3.0",
"svix-fetch": "^3.0.0",
"url-parse": "^1.4.3"
"svix-fetch": "^3.0.0"
},
"devDependencies": {
"@stablelib/utf8": "^1.0.1",
"@types/jest": "^26.0.23",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"@typescript-eslint/typescript-estree": "^4.15.2",
"eslint": "^7.20.0",
"jest": "^27.0.4",
"prettier": "^2.2.1",
"ts-jest": "^27.0.3",
"typescript": "^3.9.3"
"@types/node": "^20.11.10",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"globals": "^13.24.0",
"prettier": "^3.2.4",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"vitest": "^1.2.1"
}
}
Loading

0 comments on commit 84d4267

Please sign in to comment.