Skip to content

Commit

Permalink
chore: reconfigure project
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Aug 8, 2023
1 parent 6d3bef4 commit 7d86078
Show file tree
Hide file tree
Showing 24 changed files with 2,201 additions and 532 deletions.
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
"updateInternalDependencies": "patch",
"ignore": []
}
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,21 @@ build/*
.local/
.vercel/
.history/
build/
dist/
node_modules/
.tmp/
.local/
.cache/
.next/
.turbo/
.vite/
*.min.js
**/**/coverage
.pnpm-store
generated/
.generated/
*.min.json
*.min.js
*.min.css
jest.*.ts
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const path = require('node:path')

/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: [require.resolve('@r1stack/coding-style/eslint')],
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-console': 'warn',
'linebreak-style': 'error',
'object-curly-newline': 'error',
'newline-before-return': 'error',
},
overrides: [
{
files: ['*.ts', '*.tsx', '*.mts'],
parserOptions: {
project: [
path.resolve(__dirname, './packages/*/tsconfig.json'),
path.resolve(__dirname, './tooling/*/tsconfig.json'),
],
},
},
],
}
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/ci.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Quality Checks

env:
NODE_VERSION: '>=18.5.0'
PNPM_VERSION: 8.6

on:
push:
branches:
- 'main'
pull_request:
branches:
- main

concurrency:
group: checkCodeQuality-${{ github.ref }}
cancel-in-progress: true

jobs:
checkCodeQuality:
name: 'Lint, Build & Test'
runs-on: ubuntu-latest
steps:
# -------------- Setup
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com
cache: 'pnpm'
cache-dependency-path: './pnpm-lock.yaml'

- run: pnpm install --frozen-lockfile
# -------------- end of setup

- run: pnpm prettier-check
- run: pnpm lint
- run: pnpm publint
- run: pnpm build
- run: pnpm test:ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./
token: ${{ secrets.CODECOV_TOKEN }}
48 changes: 0 additions & 48 deletions .github/workflows/release.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit "${1}"
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint-staged
20 changes: 20 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,23 @@ public/
.history/
.pnpm-store/
.v8-compile-*
.turbo
node_modules
public/
.yarn/
.tmp/
.local/
.cache/
coverage/
pnpm-*.yaml
.history/
v8-compile-cache-*
.pnpm-store
.vercel/
.contentlayer/
.ignore/
generated/
.generated/
*.min.json
*.min.js
*.min.css
18 changes: 0 additions & 18 deletions .prettierrc

This file was deleted.

27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"args": [
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"runtimeExecutable": "sh",
"program": "${workspaceFolder}/node_modules/.bin/jest"
}
]
}
32 changes: 32 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,39 @@
{
"editor.wordWrapColumn": 100,
"editor.rulers": [100],
"editor.fontSize": 14,
"files.autoSave": "onFocusChange",
"testing.automaticallyOpenPeekView": "failureInVisibleDocument",
"jest.jestCommandLine": "node_modules/.bin/jest",
"jest.disabledWorkspaceFolders": ["packages"],
"files.exclude": {
"*/*/node_modules": true,
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.turbo": true,
"**/.vercel": true,
"**/dist": true
},
"editor.codeActionsOnSave": {
"source.addMissingImports": true,
"source.organizeImports": true,
"source.fixAll.eslint": true
},
"[markdown]": {
"editor.fontSize": 14,
"editor.lineHeight": 18,
"editor.wordWrap": "off",
"editor.wordWrapColumn": 100,
"editor.lineNumbers": "off",
"editor.quickSuggestions": {
"comments": "off",
"strings": "on",
"other": "on"
},
"editor.minimap.enabled": true
}
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Thanks for your interest to contribute to StoryLite. Please take a moment and re
## Repository

StoryLite is a monorepo using turbo and pnpm workspaces. We use Node v18. The package manager used to install and link
dependencies must be [pnpm v7](https://pnpm.io/). It can be installed as:
dependencies must be [pnpm v8](https://pnpm.io/). It can be installed as:

```sh
npm install -g pnpm@7
npm install -g pnpm@8
```

Install the dependencies after forking and cloning the repository
Expand Down
Loading

0 comments on commit 7d86078

Please sign in to comment.