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
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
dist-docs
node_modules
.DS_Store
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn build
yarn lint
yarn test
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 100,
"arrowParens": "avoid"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
46 changes: 46 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
// Format all files on save with prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"prettier.enable": true,

// Display rulers
"editor.rulers": [100, 120],

// Eslint
"eslint.enable": true,
"eslint.workingDirectories": ["."],
"eslint.format.enable": false,

// Easier debugging
"debug.javascript.autoAttachFilter": "onlyWithFlag",
"debug.javascript.terminalOptions": {
"skipFiles": ["<node_internals>/**", "**/node_modules"]
},

// Remove build & configuration files from the sidebar
"files.exclude": {
".github": true,
".husky": true,
".vscode": true,
".eslintrc.json": true,
".prettierrc": true,
"commitlint.config.js": true,
"dist-docs": true,
"yarn.lock": true,
"lerna.json": true,
"typedoc.json": true,
"**/dist": true,
"**/node_modules": true,
"**/jest.config.js": true,
"**/LICENSE": true,
"**/tsconfig.json": true
},

// Performance
"files.watcherExclude": {
"**/node_modules/**": true
}
}
15 changes: 15 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// NOTICE: When a github "squash and merge" is performed, github add the PR link in the commit
// message using the format ` (#<PR_ID>)`. Github provide the target branch of the build,
// so authorizing 4+5 = 9 characters more on main for the max header length should work
// until we reach PR #99999.

const maxLineLength = process.env.GITHUB_EVENT_NAME === "push" ? 109 : 100;

module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"header-max-length": [1, "always", maxLineLength],
"body-max-line-length": [1, "always", maxLineLength],
"footer-max-line-length": [1, "always", maxLineLength],
},
};
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.0.0"
}
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "root",
"private": true,
"devDependencies": {
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.12",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^8.4.1",
"husky": "^7.0.0",
"jest": "^27.4.4",
"lerna": "^4.0.0",
"prettier": "^2.5.1",
"ts-jest": "^27.1.1",
"typedoc": "^0.22.10",
"typescript": "^4.5.3"
},
"scripts": {
"bootstrap": "lerna bootstrap",
"build:watch": "lerna run --parallel --no-bail --no-prefix build:watch",
"build": "lerna run build",
"docs": "yarn build && typedoc",
"lint": "lerna run lint",
"prepare": "husky install",
"test": "jest"
},
"workspaces": [
"packages/*"
]
}
Loading