Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
chore(renovate): added standard-desktop and standard-desktop-linter (#12
Browse files Browse the repository at this point in the history
)

* chore(renovate): added `standard-desktop`

* chore(renovate): added `standard-desktop`

* chore(renovate): added `standard-desktop`
  • Loading branch information
thedoublejay authored Dec 7, 2022
1 parent 72b912a commit d866450
Show file tree
Hide file tree
Showing 9 changed files with 1,129 additions and 58 deletions.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# Standard

Inspired by [Birthday Research's Sticky](https://github.com/BirthdayResearch/sticky), Standard is a collection of tools and services for building scalable JS/TS apps on different platforms.
Inspired by [Birthday Research's Sticky](https://github.com/BirthdayResearch/sticky), Standard is a collection of tools
and services for building scalable JS/TS apps on different platforms.

`@waveshq/standard-*` aims to provide standard tooling and configurations for different platforms. Most platform specific library (e.g, Next.js, Electron, Tauri etc.) has its own set of rules to follow. `@waveshq/standard` aims to solve this problem so that contributors can just focus on development.
`@waveshq/standard-*` aims to provide standard tooling and configurations for different platforms. Most platform
specific library (e.g, Next.js, Electron, Tauri etc.) has its own set of rules to follow. `@waveshq/standard` aims to
solve this problem so that contributors can just focus on development.

## Packages

All packages follow the same format `@waveshq/standard-(platform)-*`. All dependencies are published
with the same version tag.

### Web

| Package | Type | Description |
| ---------------------------- | ----------- | ---------------------------------------------------------------------------------- |
| @waveshq/standard-web | Boilerplate | Boilerplate for easier scaffolding of web projects. (Next.js + React + TypeScript) |
| @waveshq/standard-web-linter | Linting | Standardized eslint and prettier config for Web based on Next.js rules. |

## Renovate
### Desktop

| Package | Type | Description |
| -------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |
| @waveshq/standard-desktop | Boilerplate | Boilerplate for easier scaffolding of desktop projects. (Tauri + Vite + React + TypeScript) |
| @waveshq/standard-desktop-linter | Linting | Standardized eslint and prettier config for Desktop. |

### Renovate

Renovate configuration files are provided on this package. Select depending on which platform you need.

Expand Down
15 changes: 15 additions & 0 deletions packages/standard-desktop-linter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
Web Linter
---

`@waveshq/standard-web-linter`

Standard linter for web applications. This module also installs `prettier`, `eslint`, `nextjs`, `husky` and `lint-staged`.

Lint rules are extended from these packages

| Package | Description |
| -------------------- | -------------------------------------------------- |
| next/core-web-vitals | Uses recommended rules from Next.js. |
| airbnb | Rules defined by airbnb. Uses TypeScript. |
| prettier | Rules defined by prettier to have same code styles |
21 changes: 21 additions & 0 deletions packages/standard-desktop-linter/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended', 'airbnb', 'airbnb-typescript', 'prettier'],
parserOptions: {
project: './tsconfig.json',
},
plugins: ['react', 'react-hooks', 'prettier'],
ignorePatterns: ['/*.config.js', '*.json', 'jest.setup.js'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
'import/prefer-default-export': 'off',
'no-plusplus': 'off',
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: ['state'],
},
],
},
};
26 changes: 26 additions & 0 deletions packages/standard-desktop-linter/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@waveshq/standard-desktop-linter",
"version": "0.0.0",
"main": "index.js",
"files": [
"index.js"
],
"dependencies": {
"eslint": "^8.29.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.2",
"lint-staged": "^13.1.0",
"next": "13.0.6",
"prettier": "^2.8.0",
"typescript": "4.9.3"
}
}
17 changes: 17 additions & 0 deletions packages/standard-desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
Desktop
---

`@waveshq/standard-desktop`

Standard desktop tools for scaffolding desktop applications. Our choice of framework is Tauri/Vite/React as a default for our desktop projects.

This package also includes a `tsconfig.json` which is customized for web usage.

| Package | Description |
| ---------- | ------------------------------------------------ |
| tauri | Used as the base library. |
| react | Fixes the react version required by Next.js |
| react-dom | Fixes the react version required by Next.js |
| typescript | Fixes the TypeScript version required by Next.js |
| vite | Default build tool |
19 changes: 19 additions & 0 deletions packages/standard-desktop/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@waveshq/standard-desktop",
"version": "0.0.0",
"files": [
"tsconfig.json"
],
"dependencies": {
"@tauri-apps/api": "^1.2.0",
"@tauri-apps/cli": "^1.2.1",
"@types/react": "^18.0.26",
"@types/react-dom": "18.0.9",
"@vitejs/plugin-react": "^2.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.4",
"typescript": "4.9.3",
"vite": "^3.2.5"
}
}
35 changes: 35 additions & 0 deletions packages/standard-desktop/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"baseUrl": "src",
"paths": {
"@api/*": ["api/*"],
"@contexts/*": ["api/contexts/*"],
"@wallet/*": ["api/wallet/*"],
"@components/*": ["components/*"],
"@layouts/*": ["layouts/*"],
"@translation": ["i18n/useTranslation"],
"@nonWallet/*": ["non-wallet/*"],
"@assets/*": ["assets/*"],
"@store/*": ["store/*"]
}
},
"include": ["src"],
"exclude": ["node_modules", "cypress"]
}
Loading

0 comments on commit d866450

Please sign in to comment.