Skip to content

Commit f5536c0

Browse files
authored
Merge pull request #3 from kagankan/feature/move-files
Move files from `markuplint` repo
2 parents a639133 + 69178c6 commit f5536c0

File tree

101 files changed

+14089
-0
lines changed

Some content is hidden

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

101 files changed

+14089
-0
lines changed

.commitlintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
extends: ['@commitlint/config-conventional'],
3+
};

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = tab
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintrc

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"@markuplint-dev/eslint-config",
5+
"plugin:react/recommended",
6+
"plugin:react-hooks/recommended",
7+
"plugin:testing-library/react"
8+
],
9+
"plugins": ["react", "react-hooks", "react-refresh", "testing-library", "vitest"],
10+
"env": {
11+
"browser": true
12+
},
13+
"parserOptions": {
14+
"ecmaFeatures": {
15+
"jsx": true
16+
}
17+
},
18+
"settings": {
19+
"react": {
20+
"version": "detect"
21+
},
22+
"import/resolver": {
23+
"typescript": []
24+
}
25+
},
26+
"rules": {
27+
"@typescript-eslint/no-unused-vars": [2, { "argsIgnorePattern": "^_", "ignoreRestSiblings": true }],
28+
"@typescript-eslint/prefer-readonly-parameter-types": [
29+
1,
30+
{
31+
"allow": [
32+
{ "from": "lib", "name": "URL" },
33+
{ "from": "package", "package": "json-schema", "name": "JSONSchema7" },
34+
{ "from": "package", "package": "json-schema", "name": "JSONSchema7Definition" }
35+
],
36+
"checkParameterProperties": false,
37+
"ignoreInferredTypes": true
38+
}
39+
],
40+
"react/display-name": 0,
41+
"react/prop-types": 0,
42+
"react-refresh/only-export-components": "warn"
43+
},
44+
"globals": {
45+
"React": true,
46+
"JSX": true
47+
},
48+
"overrides": [
49+
{
50+
"files": ["./*.js"],
51+
"rules": {
52+
"@typescript-eslint/no-var-requires": 0
53+
}
54+
},
55+
{
56+
"files": ["./*.mjs"],
57+
"rules": {
58+
"import/no-named-as-default-member": 0
59+
}
60+
},
61+
{
62+
"files": ["./**/*.tsx"],
63+
"rules": {
64+
"unicorn/filename-case": 0
65+
}
66+
},
67+
{
68+
"files": ["./**/*.spec.ts", "./**/*.spec.tsx"],
69+
"rules": {
70+
"testing-library/prefer-user-event": 2,
71+
"testing-library/no-manual-cleanup": 0
72+
}
73+
},
74+
{
75+
"files": ["./vitest.config.ts"],
76+
"rules": {
77+
"import/no-default-export": 0
78+
}
79+
}
80+
]
81+
}

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @kagankan

.github/workflows/playground.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Playground Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
19+
- name: Cache dependencies
20+
uses: actions/cache@v4
21+
with:
22+
path: ./node_modules
23+
key: depends-${{ hashFiles('yarn.lock') }}
24+
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Building Test
29+
run: yarn build
30+
31+
lint:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 20
40+
41+
- name: Cache dependencies
42+
uses: actions/cache@v4
43+
with:
44+
path: ./node_modules
45+
key: depends-${{ hashFiles('yarn.lock') }}
46+
47+
- name: Install dependencies
48+
run: yarn install --frozen-lockfile
49+
50+
- name: Lint
51+
run: yarn lint

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.idea
17+
.DS_Store
18+
*.suo
19+
*.ntvs*
20+
*.njsproj
21+
*.sln
22+
*.sw?
23+
24+
# Playwright
25+
/test-results/
26+
/playwright-report/
27+
/blob-report/
28+
/playwright/.cache/

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
yarn commitlint --edit "$1"

.husky/pre-commit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Get the current branch name
5+
branch_name=$(git symbolic-ref --short HEAD)
6+
7+
# Prevent direct commits to the main or dev branch
8+
if [ "$branch_name" = "main" ]; then
9+
echo "Direct commits to the $branch_name branch are prohibited."
10+
echo "Please commit to an appropriate branch and merge it instead."
11+
exit 1
12+
fi
13+
14+
yarn lint-staged

.lintstagedrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"**/*.{ts,tsx,js,cjs,mjs,json}": ["prettier --write"],
3+
"**/*.{ts,mjs,cjs,spec.js}": ["eslint --fix"],
4+
".github/workflows/*.yml": ["actionlint"],
5+
"**": ["cspell --no-must-find-files --no-progress --show-suggestions"]
6+
}

0 commit comments

Comments
 (0)