Skip to content

Commit

Permalink
fix(deps): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mkosir committed Nov 8, 2024
1 parent 22429af commit 33b8dd5
Show file tree
Hide file tree
Showing 15 changed files with 2,821 additions and 1,635 deletions.
55 changes: 0 additions & 55 deletions .eslintrc.cjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup Node.js ⚙️ & Cache dependencies ⚡
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '22.x'
cache: 'npm'

- name: Install dependencies 🔧
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/CI.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: CI

on:
push:
branches:
Expand Down Expand Up @@ -63,8 +61,8 @@ jobs:
- name: TypeScript Compiler 🔎
run: npm run tsc

npm-release:
name: npm release 📦
release-npm:
name: Release npm 📦
needs: [build, lint, tsc]
runs-on: ubuntu-latest

Expand All @@ -78,11 +76,11 @@ jobs:
- name: Export tRPC API 🏗️
run: npm run trpc-api-export

- name: npm release 📦
- name: Release npm 📦
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
run: npm run release

deploy:
name: Deploy 🚀
Expand Down
3 changes: 1 addition & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"*": ["prettier --write --ignore-unknown"],
"*.{js,ts}": ["eslint --max-warnings 0"]
"*": ["prettier --write --ignore-unknown"]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ In your [frontend app](https://github.com/mkosir/trpc-fe-boilerplate-vite/blob/m

<!-- Badges -->

[ci-badge]: https://github.com/mkosir/trpc-api-boilerplate/actions/workflows/CI.yml/badge.svg
[ci-url]: https://github.com/mkosir/trpc-api-boilerplate/actions/workflows/CI.yml
[ci-badge]: https://github.com/mkosir/trpc-api-boilerplate/actions/workflows/main.yml/badge.svg
[ci-url]: https://github.com/mkosir/trpc-api-boilerplate/actions/workflows/main.yml
[npm-url]: https://www.npmjs.com/package/trpc-api-boilerplate
[npm-badge]: https://img.shields.io/npm/v/trpc-api-boilerplate.svg
88 changes: 88 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintPluginReact from 'eslint-plugin-react';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
eslintPluginImport.flatConfigs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
eslintPluginReact.configs.flat.recommended,
eslintPluginPrettierRecommended,
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
eslintConfigPrettier,
{
ignores: ['!.*', 'node_modules', 'dist', 'trpc-api-export/dist', 'compiled', 'build'],
},
{
languageOptions: {
parserOptions: {
projectService: true,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
tsconfigRootDir: import.meta.name,
},
},
settings: {
'import/resolver': {
typescript: { project: 'tsconfig.json' },
},
react: { version: 'detect' },
},
},
{
files: ['**/*.{js,ts,tsx}'],

rules: {
'react/jsx-sort-props': ['error', { callbacksLast: true, shorthandFirst: true }],

'prefer-template': 'error',
'no-nested-ternary': 'error',
'no-unneeded-ternary': 'error',

'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true }],
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'typeAlias',
format: ['PascalCase'],
},
{
selector: 'variable',
types: ['boolean'],
format: ['PascalCase'],
prefix: ['is', 'should', 'has', 'can', 'did', 'will'],
},
{
// Generic type parameter must start with letter T, followed by any uppercase letter.
selector: 'typeParameter',
format: ['PascalCase'],
custom: { regex: '^T[A-Z]', match: true },
},
],

'import/no-default-export': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
},
);
Loading

0 comments on commit 33b8dd5

Please sign in to comment.