Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"projectName": "dev.setup",
"projectOwner": "build-in-blocks",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributorsPerLine": 6,
"contributorsSortAlphabetically": true,
"skipCi": true,
"contributors": [

],
"commitConvention": "angular",
"commitType": "docs"
}
48 changes: 48 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#### This pull request makes the following changes

> [!IMPORTANT]
> Remove this alert notice and supply this crucial information to help reviewers understand your submission better.

* Fixes build-in-blocks/tickets-ready-for-fixing#putTheGitHubIssueNumberHere

#

#### General checklist

> [!IMPORTANT]
> Remove this alert notice and follow the direction below to ensure and confirm that your pull request follows community guidelines. Tick the checkboxes accordingly.

- [ ] My pull request adheres to the [community pull request guidelines](https://resources.collabocate.community/pull-request-guidelines).
- [ ] I have read and understood the **Pull request guideline extension** section found at the bottom of this pull request description/body.
- [ ] I have replaced the dummy text under the subheading **Testing checklist** below with the testing checklist from the issue ticket I'm working on.

#

#### Testing checklist

Replace this dummy text with the testing checklist from the issue this pull request fixes (use checkboxes similar to how it's done in the **General checklist** above).

#

#### How to run project

> [!IMPORTANT]
> Did something change in this PR about how to run the project locally? If so, remove this alert notice (along with the tip) and follow the direction below.

> [!TIP]
> If this PR did not change how the project is run locally, you can just remove this how to run project section totally.

Replace this dummy text with new information on how to run the project (preferably using a list e.g. unordered list or ordered list).

#

#### Pull request guideline extension

> [!NOTE]
> Do not remove this note or section. This talks about extra things to take note of, in addition to the directions given in the community pull request guidelines.

We appreciate the time taken to help tackle issue tickets our community. Please go ahead to submit your pull request even if it is not yet completed, and push to the pull request actively. This will allow us to know that you have not abandoned the issue ticket. However, you should only alert reviewers about your pull request as explained below, to avoid flooding their GitHub notifications unnecessarily.

"Ready for review" implies that things are working as expected, according to how it is specified in the issue ticket you are working on. Ensure that you test the code that you are working on, that it works as expected. Don't just request for review when your pull request is not yet done and working.

The only time you should be making people review something incomplete is: if you want to show them what's not working, so that they can send help or guidance. If this is the case, be explicit about this in our Discord community or in the comment of your pull request (after you have submitted the pull request).
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# ignore all node_modules within app
node_modules

# ignore npm
.npmrc

# compiled output
/dist
/build

# ignore compiled output in subfolders
**/*/dist

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# @build-in-blocks/dev.setup

**Supported Node.js versions:** Node.js v20.x to v25.x
**Supported Node.js versions:** Node.js v20.x, v22.x, v24.x and v25.x

#

**Description:** Code linting, formatting, pre-commit hook and GitHub actions (including node version compatiblity check) development environment setup for your typescript code repository.
**How it works:** Using code quality checks from `eslint`, `husky` works with `lint-staged` to prevent code that don't meet your code quality requirements, from being commited to git and pushed to your repository's remote - it also formats your code with `prettier` based on your code formatting preferences at this point. `GitHub Actions` then runs your code quality and node version compatibilty checks on your pull requests and merge to your `develop` and/or `main` branch.

#

Expand All @@ -16,6 +16,10 @@

#

**Run into any issues?** Report them via our [product issue reports repo](https://github.com/build-in-blocks/product-issue-reports/issues)

#

### Quick user installation guide

> [!NOTE]
Expand Down Expand Up @@ -164,7 +168,7 @@ npm install -D @build-in-blocks/dev.setup

- Add the scripts you'd like to run in `extra_scripts` e.g. if you'd like the ci to run `build` and `e2e` npm scripts from your package.json, update the extra_scripts like so: `extra_scripts: "build e2e"`. The ci already runs some scripts by default - See [docs.users README.md](https://github.com/build-in-blocks/dev.setup/blob/develop/docs.users/README.md) for more info on this.

- Once you push to or make a pull request that points to `develop` branch or `main` branch, you should see the CI running on the pull request.
- Once you push to or make a pull request that points to `develop` branch or `main` branch, you should see the CI running on the pull request. Note: You can update the name of the branches, remove or add as you see fit, based on what branch names your repository uses.


#### 7. Eslint and prettier without husky
Expand All @@ -184,3 +188,18 @@ npm install -D @build-in-blocks/dev.setup
#### 8. Troubleshooting

If the eslint + typescript intellisense is not showing red and yellow wiggle lines in your file or prettier formatting does not take effect, closing and reopening your code editor (or just the file you are editing) may fix it.

#

### Contributors

[![All Contributors](https://img.shields.io/github/all-contributors/build-in-blocks/dev.setup?color=ee8449&style=flat-square)](#contributors) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/build-in-blocks/dev.setup/blob/develop/docs.contributors/README.md) [![License: AGPL v3.0](https://img.shields.io/badge/License-AGPL%20v3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
2 changes: 1 addition & 1 deletion docs.contributors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Follow the instructions to fork and clone this repository locally unto your comp
npx internal-husky-ls-init
````

- **For your TS app:** Open a terminal specifically for your typscript app, cd into the root of your typscript app.
- **For your TS app:** Open a terminal specifically for your typescript app, cd into the root of your typescript app.

- **Step 1:** Follow the installation steps in the [root README.md](https://github.com/build-in-blocks/dev.setup), not from the beginning though; start from the **2. Eslint with typescript installation and setup** section (and continue till the end).

Expand Down
7 changes: 5 additions & 2 deletions docs.users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,19 @@ In addition to prettier's default settings, our preconfigured settings tells pre
### Preconfigured Husky + lint-staged settings

- Run eslint and prettier anytime a developer tries to commit code to git.
- Prevent revent code commit to git when any of the code linting and formatting requirements are not met.
- Prevent code commit to git when any of the code linting and formatting requirements are not met.

#

### Preconfigured GitHub Actions settings

<!--
> [!NOTE]
> Change your linting script name to `eslint:lint` in the script section of your package.json, if you are using a different name. The CI running on your pull request will be able to detect your lint script and run it.
-->

The CI runs these npm scripts by default: `install` and `eslint:lint`.
- The GitHub Actions CI runs these `npm` scripts by default: `install` and `eslint:lint`.
- See [root README.md](https://github.com/build-in-blocks/dev.setup) for how to add the `npm` scripts that you have in your project, and that you want GitHub Actions to run.

#

Expand Down
72 changes: 38 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 29 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@build-in-blocks/dev.setup",
"version": "1.0.0",
"description": "",
"description": "Code linting, formatting, pre-commit hook and GitHub actions (including node version compatiblity check) development environment setup for your typescript code repository",
"type": "module",
"main": "eslint.config.mjs",
"bin": {
Expand Down Expand Up @@ -32,12 +32,38 @@
},
"homepage": "https://github.com/build-in-blocks/dev.setup#readme",
"bugs": {
"url": "https://github.com/build-in-blocks/dev.setup/issues"
"url": "https://github.com/build-in-blocks/product-issue-reports/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/build-in-blocks/dev.setup.git"
},
"license": "AGPL-3.0",
"author": "Mary Obiagba"
"author": "Mary Obiagba",
"contributors": [
"Find list of contributors in project README: https://github.com/build-in-blocks/dev.setup?tab=readme-ov-file#contributors"
],
"keywords": [
"eslint",
"prettier",
"husky",
"lint-staged",
"github actions",
"pre-commit hook",
"code quality",
"code formatting",
"typescript",
"javascript",
"node",
"config",
"setup",
"dev environment"
],
"files": [
"bin/",
"eslint.config.mjs",
"prettier.config.js",
"lint-staged.config.js",
"README.md"
]
}
Loading