Skip to content

Commit ceb8164

Browse files
committed
Updated contributing guidelines
1 parent 0f5a3fe commit ceb8164

File tree

4 files changed

+67
-16
lines changed

4 files changed

+67
-16
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,27 @@ assignees: joshwilsonvu
77
---
88

99
**Describe the bug**
10-
A clear and concise description of what the bug is.
10+
<!-- A clear and concise description of what the bug is. -->
1111

1212
**To Reproduce**
13-
Steps to reproduce the behavior:
14-
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
13+
<!-- Example code that produces the unexpected lint result, or steps to reproduce the behavior. -->
14+
<!-- Include your ESLint config if you're not using only `plugin:solid/recommended` or `plugin:solid/typescript`. -->
1915

2016
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
17+
<!-- A clear and concise description of what you expected to happen. -->
2218

2319
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
20+
<!-- If applicable, add screenshots to help explain your problem. -->
2521

26-
**Desktop (please complete the following information):**
22+
**Environment (please complete the following information):**
2723

2824
- OS: [e.g. Mac OS 11, Windows 10]
2925
- Node version (`node --version`):
3026
- `eslint-plugin-solid` version (`npm list eslint-plugin-solid`/`yarn why eslint-plugin-solid`):
3127
- `eslint` version (`npm list eslint`/`yarn why eslint`):
3228

3329
**Additional context**
34-
Add any other context about the problem here.
30+
<!-- Add any other context about the problem here. -->
31+
32+
<!-- Never expected, always appreciated! -->
33+
- [ ] I would be willing to contribute a PR to fix this issue

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ assignees: joshwilsonvu
77
---
88

99
**Describe the need**
10-
What kind of problem do you want solved?
10+
<!-- What kind of problem do you want solved? -->
1111

1212
**Suggested Solution**
13-
What would you like to see added to this plugin?
13+
<!-- What would you like to see added to this plugin? -->
1414

1515
**Possible Alternatives**
16-
Is there a way to work around the problem? If so, give a few details.
16+
<!-- Is there a way to work around the problem? If so, give a few details. -->
1717

1818
**Additional context**
19-
Add any other context about the idea here.
19+
<!-- Add any other context about the idea here. -->
20+
21+
<!-- Never expected, always appreciated! -->
22+
- [ ] I would be willing to contribute a PR to implement this feature

.github/ISSUE_TEMPLATE/question.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ assignees: joshwilsonvu
77
---
88

99
**Your Question**
10-
A question or comment about this plugin.
10+
11+
<!-- A question or comment about this plugin. -->

CONTRIBUTING.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Contributing to `eslint-plugin-solid`
2+
3+
Thanks for your interest in improving this project! We welcome questions, bug reports, and feature
4+
requests. Please file an issue before submitting a PR, and fill out applicable details in the chosen
5+
issue template.
6+
7+
> Please see our [Code of Conduct](./CODE_OF_CONDUCT.md) before contributing.
8+
9+
## Development
10+
11+
This project uses `pnpm` for package management. Run `pnpm i` to install dependencies after cloning
12+
the repo.
13+
14+
To type-check and build the code, run `pnpm build`. This will also regenerate the docs from source
15+
code descriptions and test cases, using `scripts/docs.ts`.
16+
17+
`pnpm lint` runs ESLint on the repo (so meta!).
18+
19+
Testing is _extremely_ important to maintaining the quality of this project, so we require
20+
comprehensive tests for every rule, and we check against example code provided in the docs. To run
21+
tests for individual rules as well as integration/e2e tests, run `pnpm test`. To run tests for a
22+
specific rule like `reactivity`, run `pnpm test reactivity` or `pnpm test reactivity --watch`.
23+
Before releasing new versions, we run tests against various ESLint parsers with `pnpm test:all`.
24+
25+
### Adding a new rule
26+
27+
For each rule, there's a few things to do for it to be ready for release. Let's say you have
28+
received approval to add a rule named `solid/some-name` in an issue:
29+
30+
1. Create `src/rules/some-name.ts`. Add the necessary imports and a default export of the form `{
31+
meta: { ... }, create() { ... } }`.
32+
[`solid/no-react-specific-props`](./src/rules/no-react-specific-props.ts) is a good, brief
33+
example of what's necessary.
34+
2. Create `test/rules/some-name.test.ts`. Add `valid` and `invalid` test cases, using other files
35+
for inspiration. Be sure to `export const cases` so `scripts/docs.ts` can pick up the test cases.
36+
3. Create `docs/rules/some-name.md`. You can copy the content of
37+
`docs/rules/no-react-specific-props.md` directly, as all of its content is auto-generated. Run
38+
`pnpm build` and then verify that the content has been updated to reflect the new rule.
39+
4. When good tests are written and passing, open `src/index.ts` and import your new rule. Add it to
40+
`allRules` and the `recommended` and `typescript` configs as appropriate.
41+
5. Submit your PR and await feedback. When any necessary changes have been made, it will be merged.
42+
Congratulations!
43+
44+
## Publishing
45+
46+
Publishing is currently done manually by @joshwilsonvu. When publishing a new version of
47+
`eslint-plugin-solid`, we also publish a corresponding version of `eslint-plugin-standalone`, which
48+
is a package primarily intended to support linting on https://playground.solidjs.com.

0 commit comments

Comments
 (0)