Skip to content

Commit 3e8b6f9

Browse files
committed
update project
1 parent 42845f0 commit 3e8b6f9

File tree

13 files changed

+843
-558
lines changed

13 files changed

+843
-558
lines changed

.eslintrc.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Main"
2+
on:
3+
- push
4+
5+
jobs:
6+
configure:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
10+
datetime: ${{ steps.get-datetime.outputs.datetime }}
11+
steps:
12+
- id: get-user
13+
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT
14+
- id: get-datetime
15+
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
16+
17+
build:
18+
needs: [configure]
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v5
23+
with:
24+
submodules: true
25+
- name: Install node
26+
uses: actions/setup-node@v4
27+
- name: Install dependencies
28+
run: yarn install
29+
- name: Run linter
30+
run: yarn lint
31+
- name: Run formatter
32+
run: yarn format
33+
- name: Build
34+
run: yarn build

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Publish packages'
1+
name: "Publish packages"
22

33
on:
44
release:
@@ -24,8 +24,8 @@ jobs:
2424
- name: Install node
2525
uses: actions/setup-node@v4
2626
with:
27-
registry-url: 'https://registry.npmjs.org'
28-
scope: '@avalabs'
27+
registry-url: "https://registry.npmjs.org"
28+
scope: "@avalabs"
2929
- name: Install yarn
3030
run: npm install -g yarn
3131
- name: Create .npmrc

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

eslint.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
const unusedImports = require("eslint-plugin-unused-imports");
2+
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
3+
const tsParser = require("@typescript-eslint/parser");
4+
const tsdoc = require("eslint-plugin-tsdoc");
5+
6+
module.exports = [
7+
{
8+
ignores: [
9+
"dist/**",
10+
"esm/**",
11+
"node_modules/**",
12+
"eslint.config.js",
13+
"jest.config.js",
14+
],
15+
},
16+
{
17+
files: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"],
18+
languageOptions: {
19+
ecmaVersion: "latest",
20+
sourceType: "module",
21+
parser: tsParser,
22+
parserOptions: {
23+
project: "./tsconfig.json",
24+
tsconfigRootDir: __dirname,
25+
},
26+
globals: {
27+
window: "readonly",
28+
document: "readonly",
29+
process: "readonly",
30+
require: "readonly",
31+
},
32+
},
33+
plugins: {
34+
"unused-imports": unusedImports,
35+
"@typescript-eslint": typescriptEslint,
36+
tsdoc: tsdoc,
37+
},
38+
rules: {
39+
curly: "warn",
40+
"prefer-const": "warn",
41+
"no-else-return": "warn",
42+
complexity: ["warn", 1000],
43+
"no-unneeded-ternary": "warn",
44+
"no-alert": "warn",
45+
"no-empty": "warn",
46+
"no-useless-catch": "error",
47+
"require-await": "warn",
48+
"no-continue": "warn",
49+
"no-console": "warn",
50+
"unused-imports/no-unused-imports": "warn",
51+
"no-magic-numbers": "off",
52+
},
53+
},
54+
];

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
5+
};

rollup.config.mjs

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)