* Create codeql.yml * Adding workflow configs * Added CI Workflow * Track package-lock.json for reliable builds * Fix pipeline for rimraf * Fixed npm run lint * Linter continue on error * Type check continue on errormain
parent
65a25d0417
commit
6f8695fe44
@ -0,0 +1,47 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: Build and Test on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i
|
||||
|
||||
- name: Clearing previous builds
|
||||
run: npm run clean
|
||||
|
||||
- name: Run Linter
|
||||
run: npm run lint
|
||||
continue-on-error: true
|
||||
|
||||
- name: Type Check
|
||||
run: npx tsc --noEmit
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Run Tests
|
||||
run: npm test
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import tseslintPlugin from "@typescript-eslint/eslint-plugin";
|
||||
import tseslintParser from "@typescript-eslint/parser";
|
||||
import json from "@eslint/json";
|
||||
import markdown from "@eslint/markdown";
|
||||
import css from "@eslint/css";
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
|
||||
{
|
||||
files: ["**/*.{js,mjs,cjs,ts,tsx}"],
|
||||
languageOptions: {
|
||||
parser: tseslintParser,
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": tseslintPlugin,
|
||||
},
|
||||
rules: {
|
||||
...tseslintPlugin.configs.recommended.rules,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
files: ["**/*.json"],
|
||||
plugins: { json },
|
||||
rules: { ...json.configs.recommended.rules },
|
||||
},
|
||||
{
|
||||
files: ["**/*.jsonc"],
|
||||
plugins: { json },
|
||||
rules: { ...json.configs.recommended.rules },
|
||||
},
|
||||
{
|
||||
files: ["**/*.json5"],
|
||||
plugins: { json },
|
||||
rules: { ...json.configs.recommended.rules },
|
||||
},
|
||||
{
|
||||
files: ["**/*.md"],
|
||||
plugins: { markdown },
|
||||
rules: { ...markdown.configs.recommended.rules },
|
||||
},
|
||||
{
|
||||
files: ["**/*.css"],
|
||||
plugins: { css },
|
||||
rules: { ...css.configs.recommended.rules },
|
||||
},
|
||||
];
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue