Skip to content

Commit ab2c478

Browse files
author
ACR1209
committed
Merge of main
1 parent 29f8cc6 commit ab2c478

Some content is hidden

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

51 files changed

+2846
-648
lines changed

.github/workflows/check-snippets.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ jobs:
2222
with:
2323
node-version: 22
2424

25+
- name: Install dependencies
26+
run: npm ci
27+
2528
- name: Check if snippets are formated correctly
2629
uses: int128/comment-action@v1
2730
with:
28-
run: node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder
31+
run: npx tsx utils/checkSnippetFormatting.ts # Run the script located in the utils/ folder
2932
post-on-failure: |
3033
## :x: Snippet Format Error
31-
${run.output}
34+
${run.output}

.github/workflows/pre-commit-checks.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ jobs:
2727
- name: Run lint
2828
run: npm run lint
2929

30+
- name: Run tests
31+
run: npm run test-ci
32+
3033
- name: Run build
3134
run: npm run build

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ lerna-debug.log*
1010
node_modules
1111
dist
1212
dist-ssr
13+
coverage
1314
*.local
1415
*.tsbuildinfo
1516

.husky/pre-commit

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
npm run snippets:check
12
npm run cspell
23
npm run lint
4+
npm run test-ci
35
npm run build

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
node_modules
22
dist
3+
coverage
34
snippets
45
public
56
.vite
67
coverage
78
package-lock.json
8-
.md
9+
.md

CONTRIBUTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ contributors: contributor1, contributor2, your-github-username
194194

195195
> We want to make sure that original author and contributor(s) are credited for their work.
196196
197-
198197
### Adding a New Category
199198

200199
If your snippet doesn’t fit into any existing category, you can create a new one! Just make sure it’s unique and doesn’t overlap with others (e.g., don’t create separate categories for “Date” and “Time” when “Date and Time” works).
@@ -208,7 +207,6 @@ If your snippet doesn’t fit into any existing category, you can create a new o
208207

209208
- Follow the [Adding a New Snippet](#adding-a-new-snippet) instructions.
210209

211-
212210
Example structure:
213211

214212
```md

cspell-dict.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
quicksnip
2+
slugified
23
slugifyed
34
sublanguage
45
fastapi

cspell.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"ignorePaths": [
1212
"node_modules",
1313
"dist",
14+
"coverage",
1415
"public"
1516
]
1617
}

eslint.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { fixupPluginRules } from "@eslint/compat";
22
import { FlatCompat } from "@eslint/eslintrc";
33
import js from "@eslint/js";
4-
import globals from "globals";
4+
import prettier from "eslint-plugin-prettier/recommended";
55
import reactPlugin from "eslint-plugin-react";
66
import reactHooks from "eslint-plugin-react-hooks";
77
import reactRefresh from "eslint-plugin-react-refresh";
8+
import globals from "globals";
89
import tseslint from "typescript-eslint";
9-
import prettier from "eslint-plugin-prettier/recommended";
1010

1111
const project = "./tsconfig.app.json";
1212
// eslint flat structure backwards compatibility
@@ -23,7 +23,7 @@ function legacyPlugin(name, alias = name) {
2323
}
2424

2525
export default tseslint.config(
26-
{ ignores: ["node_modules", "dist", "build"] },
26+
{ ignores: ["node_modules", "dist", "coverage"] },
2727
{
2828
extends: [
2929
js.configs.recommended,
@@ -32,7 +32,7 @@ export default tseslint.config(
3232
...compat.extends("plugin:import/typescript"),
3333
reactPlugin.configs.flat.recommended,
3434
],
35-
files: ["**/*.{ts,tsx}"],
35+
files: ["**/*.{js,ts,tsx}"],
3636
languageOptions: {
3737
ecmaVersion: 2020,
3838
globals: globals.browser,

0 commit comments

Comments
 (0)