Skip to content

Commit 9ae6201

Browse files
committed
chore: update tooling, add contribute notice, local ci
1 parent 0ee96fc commit 9ae6201

13 files changed

+6159
-10828
lines changed

.eslintrc.cjs

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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ dist-ssr
3333
.netlify
3434

3535
.turbo*
36+
37+
test-results
38+
39+
.eslintcache

.prettierrc.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
useTabs: true
22
singleQuote: true
33
trailingComma: all
4+
# printWidth: 100
45

56
overrides:
67
- files: ['*.json', '*.yaml']
78
options:
89
useTabs: false
9-
10-
plugins:
11-
- '@trivago/prettier-plugin-sort-imports'
12-
10+
# plugins:
11+
# - '@trivago/prettier-plugin-sort-imports'
1312
# importOrder: ['^@core/(.*)$', '^@server/(.*)$', '^@ui/(.*)$', '^[./]']
1413
# TODO: better custom ordering
15-
importOrder: ['^lit(.*)$', '^@jsfe/(.*)$', '^@(.*)$', '^[./]']
16-
importOrderSeparation: true
17-
importOrderSortSpecifiers: true
18-
importOrderParserPlugins: ['typescript', 'decorators-legacy']
14+
# importOrder: ['^lit(.*)$', '^@jsfe/(.*)$', '^@(.*)$', '^[./]']
15+
# importOrderSeparation: true
16+
# importOrderSortSpecifiers: true
17+
# importOrderParserPlugins: ['typescript', 'decorators-legacy']

.stylelintrc.cjs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
1-
/** @type {import("@types/stylelint").Options} */
1+
/** @type {import('stylelint').Config} */
22

33
module.exports = {
44
extends: [
55
'stylelint-config-standard',
66
'stylelint-config-standard-scss',
7-
'stylelint-config-prettier',
87
'stylelint-config-recess-order',
98
],
109

11-
plugins: [
12-
//
13-
'stylelint-order',
14-
],
10+
plugins: ['stylelint-order'],
1511

1612
overrides: [
1713
{
1814
files: ['*.vue', '**/*.vue'],
1915
extends: [
2016
'stylelint-config-standard-scss',
21-
'stylelint-config-prettier',
2217
'stylelint-config-recommended-vue/scss',
2318
],
2419
},
2520
],
2621
rules: {
22+
'declaration-property-value-no-unknown': true,
2723
'comment-empty-line-before': null,
28-
// Shorthand units make things hard to read and change
2924
'shorthand-property-no-redundant-values': null,
3025
'scss/double-slash-comment-empty-line-before': null,
3126
'color-function-notation': null,
@@ -49,8 +44,7 @@ module.exports = {
4944
ignorePseudoElements: ['v-deep'],
5045
},
5146
],
52-
'max-line-length': [100, , { ignore: ['comments'] }],
53-
47+
// 'max-line-length': [100, { ignore: ['comments'] }],
5448
'selector-class-pattern': null,
5549
},
5650
};

CONTRIBUTE.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Contributing to JSON Schema Form Element
2+
3+
Thank you for your interest in contributing to JSFE! This document will guide you through the process of setting up the development environment and submitting your contributions.
4+
5+
## Prerequisites
6+
7+
Before you begin, ensure you have the following installed:
8+
9+
- [Node.js](https://nodejs.org/) (version 20 LTS or later)
10+
- [pnpm](https://pnpm.io/) (version 9.12.3 or later)
11+
- Git
12+
13+
## Getting Started
14+
15+
1. Fork the repository on GitHub
16+
2. Clone your fork locally:
17+
18+
```bash
19+
git clone https://github.com/YOUR_USERNAME/jsfe.git
20+
cd jsfe
21+
```
22+
23+
3. Launch the local CI to bootstrap the monorepo and to check that everything is OK on your machine:
24+
```bash
25+
./local-ci.sh
26+
```
27+
28+
## Development Workflow
29+
30+
1. Create a new branch for your feature/fix:
31+
32+
```bash
33+
git checkout -b feat/your-feature-name
34+
# or
35+
git checkout -b fix/your-fix-name
36+
```
37+
38+
2. Start the development tasks:
39+
40+
```bash
41+
pnpm dev
42+
```
43+
44+
3. Make your changes and ensure they follow our coding standards:
45+
46+
```bash
47+
# Run linting
48+
pnpm lint
49+
50+
# Fix linting issues
51+
pnpm lint:fix
52+
53+
# Check formatting
54+
pnpm format:check
55+
56+
# Fix formatting
57+
pnpm format
58+
```
59+
60+
4. Run tests:
61+
62+
```bash
63+
# Run unit tests
64+
pnpm test:unit
65+
66+
# Run e2e tests
67+
pnpm test:e2e
68+
69+
# Run tests in watch mode during development
70+
pnpm test:unit:dev
71+
pnpm test:e2e:dev
72+
```
73+
74+
## Commit Guidelines
75+
76+
We follow [Conventional Commits](https://www.conventionalcommits.org/) specification. Your commit messages should be structured as follows:
77+
78+
```
79+
<type>[optional scope]: <description>
80+
81+
[optional body]
82+
83+
[optional footer(s)]
84+
```
85+
86+
Types:
87+
88+
- `feat`: A new feature
89+
- `fix`: A bug fix
90+
- `docs`: Documentation only changes
91+
- `style`: Changes that do not affect the meaning of the code
92+
- `refactor`: A code change that neither fixes a bug nor adds a feature
93+
- `perf`: A code change that improves performance
94+
- `test`: Adding missing tests or correcting existing tests
95+
- `build`: Changes that affect the build system or external dependencies
96+
- `ci`: Changes to our CI configuration files and scripts
97+
- `chore`: Changes to the build process or auxiliary tools
98+
99+
Examples:
100+
101+
```bash
102+
git commit -m "feat(engine): add support for custom validators"
103+
git commit -m "fix(webawesome): resolve styling issues in dark mode"
104+
git commit -m "docs: update API documentation"
105+
git commit -m "build: update typescript to 5.8.3"
106+
git commit -m "ci: add node 21 to test matrix"
107+
```
108+
109+
## Submitting a Pull Request
110+
111+
1. Push your changes to your fork:
112+
113+
```bash
114+
git push origin feat/your-feature-name
115+
```
116+
117+
2. Go to the original repository on GitHub and create a Pull Request
118+
119+
3. In your PR description:
120+
121+
- Clearly describe the problem and solution
122+
- Include the relevant issue number if applicable
123+
- Include screenshots/GIFs for UI changes
124+
125+
4. Wait for the maintainers to review your PR. Make any requested changes.
126+
127+
## Project Structure
128+
129+
```
130+
packages/
131+
├── engine/ # Core form engine
132+
├── generics/ # Generic utilities, form HTML element and helpers
133+
├── webawesome/ # Web components form implementation
134+
├── ...
135+
e2e/ # End-to-end tests
136+
example-app/ # Example application
137+
scripts/ # Build and utility scripts
138+
```
139+
140+
## Need Help?
141+
142+
If you need help or have questions:
143+
144+
1. Check the documentation
145+
2. Open an issue with a clear title and description
146+
3. Be respectful and constructive in all interactions
147+
148+
Thank you for contributing to JSON Schema Form Element! 💖

0 commit comments

Comments
 (0)