mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-22 12:21:12 +00:00
Merge remote-tracking branch 'origin/main' into thumbnail_sizes
This commit is contained in:
commit
933553baaa
8 changed files with 349 additions and 398 deletions
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"ignorePatterns": ["putTypesInIndex.js"],
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json",
|
||||
"warnOnUnsupportedTypeScriptVersion": false
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-interface": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
"arrow-body-style": 0,
|
||||
"curly": 0,
|
||||
"eol-last": 0,
|
||||
"eqeqeq": 0,
|
||||
"func-style": 0,
|
||||
"import/no-duplicates": 0,
|
||||
"max-statements": 0,
|
||||
"max-params": 0,
|
||||
"new-cap": 0,
|
||||
"no-console": 0,
|
||||
"no-duplicate-imports": 0,
|
||||
"no-extra-parens": 0,
|
||||
"no-return-assign": 0,
|
||||
"no-throw-literal": 1,
|
||||
"no-trailing-spaces": 0,
|
||||
"no-unused-expressions": 0,
|
||||
"no-useless-constructor": 0,
|
||||
"no-useless-escape": 0,
|
||||
"no-var": 0,
|
||||
"prefer-const": 0,
|
||||
"prefer-rest-params": 0,
|
||||
"quote-props": 0,
|
||||
"unicorn/filename-case": 0
|
||||
}
|
||||
}
|
49
eslint.config.mjs
Normal file
49
eslint.config.mjs
Normal file
|
@ -0,0 +1,49 @@
|
|||
import pluginJs from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default [
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
parser: tseslint.parser,
|
||||
},
|
||||
},
|
||||
// For some reason this has to be in its own block
|
||||
{
|
||||
ignores: ["putTypesInIndex.js", "dist/*", "docs/*"],
|
||||
},
|
||||
{
|
||||
files: ["src/**/*"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-empty-interface": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
"arrow-body-style": 0,
|
||||
curly: 0,
|
||||
"eol-last": 0,
|
||||
eqeqeq: 0,
|
||||
"func-style": 0,
|
||||
"import/no-duplicates": 0,
|
||||
"max-statements": 0,
|
||||
"max-params": 0,
|
||||
"new-cap": 0,
|
||||
"no-console": 0,
|
||||
"no-duplicate-imports": 0,
|
||||
"no-extra-parens": 0,
|
||||
"no-return-assign": 0,
|
||||
"no-throw-literal": 1,
|
||||
"no-trailing-spaces": 0,
|
||||
"no-unused-expressions": 0,
|
||||
"no-useless-constructor": 0,
|
||||
"no-useless-escape": 0,
|
||||
"no-var": 0,
|
||||
"prefer-const": 0,
|
||||
"prefer-rest-params": 0,
|
||||
"quote-props": 0,
|
||||
"unicorn/filename-case": 0,
|
||||
},
|
||||
},
|
||||
];
|
12
package.json
12
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "lemmy-js-client",
|
||||
"description": "A javascript / typescript client for Lemmy",
|
||||
"version": "0.19.4-alpha.18",
|
||||
"version": "0.19.4",
|
||||
"author": "Dessalines <tyhou13@gmx.com>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "./dist/index.js",
|
||||
|
@ -11,19 +11,18 @@
|
|||
"scripts": {
|
||||
"build": "tsc",
|
||||
"docs": "typedoc src/index.ts",
|
||||
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src && prettier --check src",
|
||||
"lint": "tsc --noEmit && eslint --report-unused-disable-directives && prettier --check src",
|
||||
"prepare": "pnpm run build && husky"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.11.19",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
||||
"@typescript-eslint/parser": "^7.0.1",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.2",
|
||||
|
@ -33,9 +32,10 @@
|
|||
"prettier-plugin-packagejson": "^2.4.11",
|
||||
"sortpack": "^2.4.0",
|
||||
"typedoc": "^0.25.8",
|
||||
"typescript": "^5.3.3"
|
||||
"typescript": "^5.3.3",
|
||||
"typescript-eslint": "^7.9.0"
|
||||
},
|
||||
"packageManager": "pnpm@9.0.6+sha256.0624e30eff866cdeb363b15061bdb7fd9425b17bc1bb42c22f5f4efdea21f6b3",
|
||||
"packageManager": "pnpm@9.1.4",
|
||||
"types": "./dist/index.d.ts",
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,js}": [
|
||||
|
|
630
pnpm-lock.yaml
630
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
5
renovate.json
Normal file
5
renovate.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:recommended"],
|
||||
"schedule": ["before 4am on the first day of the month"]
|
||||
}
|
|
@ -5,5 +5,4 @@ export interface ImageDetails {
|
|||
width: number;
|
||||
height: number;
|
||||
content_type: string;
|
||||
published: string;
|
||||
}
|
||||
|
|
|
@ -89,8 +89,6 @@ export type LemmyErrorType =
|
|||
| { error: "person_is_banned_from_site"; message: string }
|
||||
| { error: "invalid_vote_value" }
|
||||
| { error: "page_does_not_specify_creator" }
|
||||
| { error: "page_does_not_specify_group" }
|
||||
| { error: "no_community_found_in_cc" }
|
||||
| { error: "no_email_setup" }
|
||||
| { error: "local_site_not_setup" }
|
||||
| { error: "email_smtp_server_needs_a_port" }
|
||||
|
@ -153,7 +151,6 @@ export type LemmyErrorType =
|
|||
| { error: "permissive_regex" }
|
||||
| { error: "invalid_regex" }
|
||||
| { error: "captcha_incorrect" }
|
||||
| { error: "password_reset_limit_reached" }
|
||||
| { error: "couldnt_create_audio_captcha" }
|
||||
| { error: "invalid_url_scheme" }
|
||||
| { error: "couldnt_send_webmention" }
|
||||
|
@ -166,4 +163,5 @@ export type LemmyErrorType =
|
|||
| { error: "invalid_bot_action" }
|
||||
| { error: "cant_block_local_instance" }
|
||||
| { error: "url_without_domain" }
|
||||
| { error: "inbox_timeout" }
|
||||
| { error: "unknown"; message: string };
|
||||
|
|
|
@ -4,7 +4,7 @@ export interface Register {
|
|||
username: string;
|
||||
password: string;
|
||||
password_verify: string;
|
||||
show_nsfw: boolean;
|
||||
show_nsfw?: boolean;
|
||||
email?: string;
|
||||
captcha_uuid?: string;
|
||||
captcha_answer?: string;
|
||||
|
|
Loading…
Reference in a new issue