Skip to content

Commit

Permalink
chore: project restructure (#3)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: project is a es module now
  • Loading branch information
sahinvardar authored Nov 23, 2023
1 parent c263341 commit e821f55
Show file tree
Hide file tree
Showing 16 changed files with 4,830 additions and 4,351 deletions.
52 changes: 52 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:typescript-sort-keys/recommended'
],
plugins: ['@typescript-eslint', 'unused-imports', 'typescript-sort-keys'],
ignorePatterns: [
'*.cjs',
'jest.*.ts',
'/dist',
'**/cdk.out/*',
'**/build/*',
'pnpm-*.yaml',
'*.sql',
'*.sh',
'*.png',
'*.svg',
'*.jpg',
'*.jpeg',
'*.csv',
'*.ttf',
'*.postcss',
'*.html',
'*.md',
'*.css'
],
overrides: [],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2021
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'turbo/no-undeclared-env-vars': 'off',
'unused-imports/no-unused-imports-ts': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }
]
},
env: {
browser: true,
es2022: true,
node: true
},
globals: {
$$Generic: 'readonly'
}
};
15 changes: 15 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-test
on: push
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm build
- run: pnpm test
19 changes: 0 additions & 19 deletions .github/workflows/npm-publish.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release
on:
push:
branches: [release]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint-staged
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "avoid",
"trailingComma": "none"
}
23 changes: 0 additions & 23 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit e821f55

Please sign in to comment.