Skip to content

Commit

Permalink
fix publint
Browse files Browse the repository at this point in the history
  • Loading branch information
beeequeue committed Aug 31, 2024
0 parents commit 0c417bd
Show file tree
Hide file tree
Showing 22 changed files with 5,647 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
25 changes: 25 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
extends: [
"config:js-app",
"helpers:disableTypesNodeMajor",
"schedule:earlyMondays",
"group:allNonMajor",
"schedule:monthly"
],
prHourlyLimit: 5,
prConcurrentLimit: 5,
branchConcurrentLimit: 5,
labels: ["dependencies"],
baseBranches: ["main"],
packageRules: [
{
matchUpdateTypes: ["patch", "minor"],
matchManagers: ["npm"],
automerge: true,
},
{
packagePatterns: ["lint", "!lint-staged"],
groupName: "Linting",
},
],
}
122 changes: 122 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: ci

on:
push:
branches:
- main
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- run: corepack enable

- name: find pnpm cache path
id: cache
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.cache.outputs.path }}
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
v1-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm lint

typecheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- run: corepack enable

- name: find pnpm cache path
id: cache
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.cache.outputs.path }}
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
v1-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm typecheck

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- run: corepack enable

- name: find pnpm cache path
id: cache
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.cache.outputs.path }}
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
v1-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm test

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- run: corepack enable

- name: find pnpm cache path
id: cache
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.cache.outputs.path }}
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
v1-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build

- run: pnpm publint
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.DS_Store

node_modules/
dist/

.idea/
!.idea/jsLibraryMappings.xml
!.idea/template.iml
!.idea/prettier.xml

.env
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
save-exact = true
shell-emulator = true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 90,
"semi": false,
"htmlWhitespaceSensitivity": "ignore",
"trailingComma": "all"
}
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# remsg

[![npm](https://img.shields.io/npm/v/remsg)](https://www.npmjs.com/package/remsg)
![npm bundle size](https://deno.bundlejs.com/?q=remsg&badge)
![node-current](https://img.shields.io/node/v/remsg)

A library for parsing and serializing MSG files for the RE Engine, more specifically for Monster Hunter: Rise.

This library pretty much a port of [REMSG_Converter](https://github.com/dtlnor/REMSG_Converter) which is based on the work in [mhrice](https://github.com/wwylele/mhrice).

## Usage

```typescript
import { encodeMsg, decodeMsg } from "remsg"

const data = /* load a msg file */
const json = decodeMsg(data)
const msg = encodeMsg(json)
```
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import antfu from "@antfu/eslint-config"

export default antfu({
stylistic: false,
test: { overrides: { "test/no-import-node-test": "off" } },
typescript: {
tsconfigPath: "tsconfig.json",
overrides: {
"no-console": "off",
"ts/no-use-before-define": "off",
"ts/consistent-type-definitions": "off",
"ts/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
"ts/no-unsafe-argument": "off",
"ts/no-unsafe-assignment": "off",
},
},
})
61 changes: 61 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "remsg",
"description": "A library for parsing and serializing MSG files for the RE Engine.",
"type": "module",
"version": "0.0.0",
"author": "BeeeQueue <adam@haglund.dev>",
"repository": {
"type": "git",
"url": "https://github.com/beeequeue/remsg.git"
},
"license": "MIT",
"packageManager": "pnpm@9.9.0",
"engines": {
"node": ">=20"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,json5,yaml,yml,css,scss,md}": [
"prettier --write"
]
},
"files": [
"dist",
"CHANGELOG.md"
],
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"scripts": {
"build": "tsup",
"lint": "eslint src",
"test": "vitest",
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "3.0.0",
"@tsconfig/node22": "22.0.0",
"@tsconfig/strictest": "2.0.5",
"@types/node": "22.5.1",
"binary-util": "0.0.0",
"dotenv": "16.4.5",
"eslint": "9.9.1",
"eslint-define-config": "2.1.0",
"lint-staged": "15.2.9",
"prettier": "3.3.3",
"publint": "0.2.10",
"simple-git-hooks": "2.11.1",
"tsup": "8.2.4",
"typescript": "5.5.4",
"vitest": "2.0.5"
},
"pnpm": {
"overrides": {
"is-core-module": "npm:@nolyfill/is-core-module@^1"
}
}
}
Loading

0 comments on commit 0c417bd

Please sign in to comment.