-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul Mineev
committed
Jun 19, 2022
1 parent
fa7d5ce
commit 1b70fa9
Showing
27 changed files
with
4,664 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = tab | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[{*.json,.prettierrc}] | ||
indent_style = space | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: './tsconfig.json', | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
overrides: [ | ||
{ | ||
files: ['*.spec.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
coverage | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/* | ||
!dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": false, | ||
"printWidth": 100, | ||
"quoteProps": "consistent", | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# @remark42/api | ||
|
||
Implementation of API methods for Remark42 | ||
|
||
## Development | ||
|
||
- If you don't have `pnpm` installed run `npm i -g pnpm` | ||
- Install dependencies `pnpm i` | ||
- Run development mode with `pnpm run dev` | ||
- Build lib with `pnpm run build` | ||
- Run tests with `pnpm run test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { Config } from '@jest/types' | ||
|
||
const config: Config.InitialOptions = { | ||
testEnvironment: 'jsdom', | ||
transform: { | ||
'^.+\\.ts$': '@swc/jest', | ||
}, | ||
collectCoverageFrom: ['src/**/*.ts'], | ||
extensionsToTreatAsEsm: ['.ts', '.tsx'], | ||
moduleNameMapper: { | ||
'^@test/(.*)$': '<rootDir>/test/$1', | ||
}, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "@remark42/api", | ||
"version": "0.1.0-alpha.0", | ||
"description": "Implementation of API methods for Remark42", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/umputun/remark42.git#master" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/umputun/remark42/issues" | ||
}, | ||
"homepage": "https://github.com/umputun/remark42/tree/master/frontend/packages/api#readme", | ||
"keywords": [ | ||
"remark42", | ||
"comments" | ||
], | ||
"author": "Paul Mineev", | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "tsc -w -p tsconfig.dev.json", | ||
"build": "tsc", | ||
"prebuild": "rm -rf dist", | ||
"test": "jest", | ||
"coverage": "jest --coverage", | ||
"lint": "eslint src --ext=.ts,.js", | ||
"type-check": "tsc --noEmit", | ||
"format": "prettier --write '**/*.{ts,js,json}'" | ||
}, | ||
"devDependencies": { | ||
"@jest/types": "^28.1.1", | ||
"@swc/core": "^1.2.203", | ||
"@swc/jest": "^0.2.21", | ||
"@types/jest": "^28.1.2", | ||
"@types/node": "^18.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.28.0", | ||
"@typescript-eslint/parser": "^5.28.0", | ||
"eslint": "^8.18.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"jest": "^28.1.1", | ||
"jest-environment-jsdom": "^28.1.1", | ||
"prettier": "^2.7.1", | ||
"ts-node": "^10.8.1", | ||
"typescript": "^4.7.4" | ||
} | ||
} |
Oops, something went wrong.