Skip to content

Commit c3222d6

Browse files
Merge pull request #246 from contentstack/VC-115/live-editor-support
Vc 115/live editor support
2 parents 250bcd3 + 90b7d60 commit c3222d6

223 files changed

Lines changed: 41911 additions & 26729 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

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

.eslintrc.js

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

.eslintrc.json

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

.github/workflows/unit-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Unit test coverage"
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
permissions:
10+
# Required to checkout the code
11+
contents: read
12+
# Required to put a comment into the pull-request
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: "Install Node"
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "21.x"
21+
- name: "Install Deps"
22+
run: npm install
23+
- name: "Test"
24+
run: npx vitest --coverage.enabled true
25+
- name: "Report Coverage"
26+
# Set if: always() to also generate the report if tests are failing
27+
# Only works if you set `reportOnFailure: true` in your vite config as specified above
28+
if: always()
29+
uses: davelosert/vitest-coverage-report-action@v2

.husky/pre-commit

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
. "$(dirname -- "$0")/_/husky.sh"
33

44
npm run build
5-
npx ts-node --esm mustache.ts
5+
npx tsx mustache.ts
66
git add .
77
npx lint-staged

.husky/pre-push

100755100644
File mode changed.

.talismanrc

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

babel.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
presets: [
3+
"@babel/preset-react",
4+
["@babel/preset-env", { targets: "defaults" }],
5+
"@babel/preset-typescript",
6+
],
7+
plugins: [
8+
["@babel/plugin-transform-runtime"],
9+
[
10+
"@babel/plugin-transform-react-jsx",
11+
{
12+
runtime: "automatic",
13+
importSource: "preact",
14+
},
15+
],
16+
],
17+
};

eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import globals from "globals";
2+
import eslintConfigPrettier from "eslint-config-prettier";
3+
import pluginJs from "@eslint/js";
4+
import tseslint from "typescript-eslint";
5+
import pluginReact from "eslint-plugin-react";
6+
import "eslint-plugin-only-warn";
7+
8+
export default [
9+
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
10+
{ languageOptions: { globals: globals.browser } },
11+
pluginJs.configs.recommended,
12+
...tseslint.configs.recommended,
13+
pluginReact.configs.flat.recommended,
14+
eslintConfigPrettier,
15+
{
16+
rules: {
17+
"@typescript-eslint/no-explicit-any": "off",
18+
// allow unused vars with underscore prefix
19+
"@typescript-eslint/no-unused-vars": [
20+
"warn",
21+
{
22+
argsIgnorePattern: "^_",
23+
varsIgnorePattern: "^_",
24+
destructuredArrayIgnorePattern: "^_",
25+
},
26+
],
27+
},
28+
},
29+
];

jest.config.cjs

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

0 commit comments

Comments
 (0)