Update CI/CD, added dev dependencies
Some checks failed
CI / build (push) Failing after 16s

This commit is contained in:
Andrey Kernichniy 2026-03-07 01:15:27 +07:00
parent f106226e70
commit 11bd65d2d0
6 changed files with 1511 additions and 3 deletions

View file

@ -0,0 +1,36 @@
name: CI
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: [docker]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: ${{ vars.VERDACCIO_URL }}
- name: Install dependencies
run: npm ci
- name: Prettier
run: npm run prettier:check
- name: ES Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build

View file

@ -2,7 +2,8 @@ name: CI
on:
push:
branches: [main]
tags:
- "*.*.*"
workflow_dispatch:
jobs:
@ -21,6 +22,15 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Prettier
run: npm run prettier:check
- name: ES Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
@ -47,6 +57,9 @@ jobs:
with:
node-version: '20'
registry-url: ${{ vars.VERDACCIO_URL }}
env:
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
- name: Publish to NPM
run: npm publish ./artifact --registry ${{ vars.VERDACCIO_URL }}

39
eslint.config.mjs Normal file
View file

@ -0,0 +1,39 @@
import { defineConfig } from "eslint/config";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default defineConfig([{
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
plugins: {
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
globals: {
...globals.browser,
},
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"@typescript-eslint/no-explicit-any": "warn",
"no-prototype-builtins": "off",
},
}]);

View file

@ -37,4 +37,3 @@ export interface IRadialGradient {
export interface IConicGradient {
type: "conic";
}

1408
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,12 @@
"scripts": {
"build": "npm run clean && tsc && npm run create-package",
"create-package": "node ./scripts/create-package",
"clean": "rimraf dist"
"clean": "rimraf dist",
"prettier:check": "prettier --check \"./lib/src/**/*.*\"",
"prettier:fix": "prettier --write \"./lib/src/**/*.*\"",
"lint": "eslint lib/src/**/*.ts",
"prepare": "husky",
"test": "echo test"
},
"author": "",
"license": "ISC",
@ -14,6 +19,14 @@
"@gxc-solutions/math": "^0.0.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.4",
"@eslint/js": "^10.0.1",
"@types/node": "^25.3.3",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"eslint": "^10.0.2",
"globals": "^17.4.0",
"husky": "^9.1.7",
"prettier": "^3.8.1",
"rimraf": "^6.0.1",
"typescript": "^5.9.3"
}