Skip to content

Commit

Permalink
build: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
OpportunityLiu committed Sep 6, 2024
1 parent e520051 commit 861c783
Show file tree
Hide file tree
Showing 8 changed files with 4,075 additions and 2,951 deletions.
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.yml

This file was deleted.

142 changes: 142 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
// @ts-check
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import ts from 'typescript-eslint';

const JS_EXT = ['js', 'jsx', 'mjs', 'cjs'];

/** @type {(import('eslint').Linter.Config | undefined)[]} */
export default [
// eslint
js.configs.recommended,
{
rules: {
'no-undef': 0,
eqeqeq: [1, 'smart'],
'no-console': 1,
},
},

// typescript
.../** @type {(import('eslint').Linter.Config)[]} */ (ts.configs.recommendedTypeChecked),
.../** @type {(import('eslint').Linter.Config)[]} */ (ts.configs.stylisticTypeChecked),
{
languageOptions: {
parserOptions: {
ecmaVersion: 'latest',
projectService: true,
tsconfigRootDir: process.cwd(),
},
},
},
{
rules: {
'@typescript-eslint/array-type': [1, { default: 'array-simple' }],
// https://github.com/typescript-eslint/typescript-eslint/issues/3602
'@typescript-eslint/class-literal-property-style': 0,
'@typescript-eslint/consistent-type-definitions': 0,
'@typescript-eslint/consistent-type-exports': [
1,
{
fixMixedExportsWithInlineTypeSpecifier: true,
},
],
'@typescript-eslint/consistent-type-imports': [
1,
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
disallowTypeAnnotations: false,
},
],
'@typescript-eslint/explicit-function-return-type': [
2,
{
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
allowExpressions: true,
allowIIFEs: true,
},
],
'@typescript-eslint/explicit-member-accessibility': [1, { accessibility: 'no-public' }],
'@typescript-eslint/explicit-module-boundary-types': 1,
'@typescript-eslint/no-extraneous-class': [1, { allowWithDecorator: true }],
'@typescript-eslint/no-import-type-side-effects': 2,
'@typescript-eslint/no-invalid-void-type': [1, { allowAsThisParameter: true }],
'@typescript-eslint/no-meaningless-void-operator': 1,
'@typescript-eslint/no-mixed-enums': 2,
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 2,
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-this-alias': [2, { allowedNames: ['self'] }],
'@typescript-eslint/no-unnecessary-template-expression': 1,
// Hard to work with type-imported enums, which is preferred in our codebase.
'@typescript-eslint/no-unsafe-enum-comparison': 0,
'@typescript-eslint/no-unused-vars': [1, { args: 'none', varsIgnorePattern: '^_', caughtErrors: 'none' }],
'no-useless-constructor': 0,
'@typescript-eslint/no-useless-constructor': 1,
'@typescript-eslint/parameter-properties': [
1,
{
allow: ['protected readonly', 'public readonly', 'private readonly', 'readonly', 'private'],
prefer: 'parameter-property',
},
],
'prefer-destructuring': 0,
'@typescript-eslint/prefer-destructuring': [
1,
{
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: false,
object: false,
},
},
],
'@typescript-eslint/prefer-nullish-coalescing': [
1,
{
ignoreConditionalTests: true,
ignoreMixedLogicalExpressions: true,
ignorePrimitives: { string: true },
},
],
'@typescript-eslint/prefer-readonly': 1,
'@typescript-eslint/prefer-readonly-parameter-types': 0,
'@typescript-eslint/prefer-reduce-type-parameter': 1,
'@typescript-eslint/prefer-return-this-type': 1,
'@typescript-eslint/prefer-ts-expect-error': 2,
'@typescript-eslint/promise-function-async': 1,
'@typescript-eslint/require-array-sort-compare': 2,
'@typescript-eslint/switch-exhaustiveness-check': 1,
'@typescript-eslint/unified-signatures': [1, { ignoreDifferentlyNamedParameters: true }],
},
},
{
files: JS_EXT.map((ext) => `**/*.${ext}`),
rules: {
// Disable as these rules are not supported in JavaScript, use jsdoc rules instead
// https://typescript-eslint.io/rules/explicit-module-boundary-types#configuring-in-a-mixed-jsts-codebase
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,

// Due to the lack support for jsdoc type assertion, disable these rules in JavaScript
// https://github.com/typescript-eslint/typescript-eslint/issues/1682
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
},
},
{
name: 'Disable rules that conflict with Prettier',
...prettier,
},
{
ignores: ['node_modules/', 'dist/', 'coverage/', 'test/', 'tools/', 'scripts/', '*.config.{js,ts}'],
},
];
72 changes: 35 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "3.0.0",
"type": "module",
"engines": {
"node": "^20.15.0"
"node": "^20.17.0"
},
"packageManager": "pnpm@9.6.0",
"packageManager": "pnpm@9.9.0",
"scripts": {
"start:server": "nest start --debug --watch",
"build:server": "nest build",
Expand All @@ -19,7 +19,7 @@
"test:browser": "echo no test",
"clean": "rimraf dist",
"format": "prettier --ignore-path .gitignore --write .",
"lint": "eslint --ext .ts --ignore-path .gitignore --ignore-pattern '**/*.spec.ts' -- ."
"lint": "eslint"
},
"imports": {
"#*": "./dist/*.js"
Expand All @@ -28,18 +28,18 @@
"dependencies": {
"@actions/core": "~1.10.1",
"@actions/exec": "~1.1.1",
"@actions/http-client": "~2.2.1",
"@actions/http-client": "~2.2.2",
"@fastify/static": "^7.0.4",
"@nestjs/common": "~10.3.10",
"@nestjs/common": "~10.4.1",
"@nestjs/config": "~3.2.3",
"@nestjs/core": "~10.3.10",
"@nestjs/platform-fastify": "~10.3.10",
"@nestjs/core": "~10.4.1",
"@nestjs/platform-fastify": "~10.4.1",
"@nestjs/swagger": "~7.4.0",
"@octokit/auth-app": "~7.1.0",
"@octokit/auth-app": "~7.1.1",
"@octokit/auth-oauth-app": "~8.1.1",
"@octokit/request-error": "^6.1.4",
"@octokit/rest": "~21.0.1",
"axios": "~1.7.2",
"@octokit/rest": "~21.0.2",
"axios": "~1.7.7",
"class-transformer": "~0.5.1",
"class-validator": "~0.14.1",
"cli-color": "~2.0.4",
Expand All @@ -57,53 +57,51 @@
"parse5": "~7.1.2",
"reflect-metadata": "~0.2.2",
"rxjs": "~7.8.1",
"simple-git": "~3.25.0",
"tslib": "~2.6.3"
"simple-git": "~3.26.0",
"tslib": "~2.7.0"
},
"devDependencies": {
"@angular/animations": "^18.1.2",
"@angular/build": "^18.1.3",
"@angular/animations": "^18.2.3",
"@angular/build": "^18.2.3",
"@angular/cdk": "^16.2.14",
"@angular/cli": "^18.1.3",
"@angular/common": "^18.1.2",
"@angular/compiler": "^18.1.2",
"@angular/compiler-cli": "^18.1.2",
"@angular/core": "^18.1.2",
"@angular/forms": "^18.1.2",
"@angular/language-service": "^18.1.2",
"@angular/cli": "^18.2.3",
"@angular/common": "^18.2.3",
"@angular/compiler": "^18.2.3",
"@angular/compiler-cli": "^18.2.3",
"@angular/core": "^18.2.3",
"@angular/forms": "^18.2.3",
"@angular/language-service": "^18.2.3",
"@angular/material": "^16.2.14",
"@angular/platform-browser": "^18.1.2",
"@angular/platform-browser-dynamic": "^18.1.2",
"@angular/router": "^18.1.2",
"@angular/service-worker": "^18.1.2",
"@angular/platform-browser": "^18.2.3",
"@angular/platform-browser-dynamic": "^18.2.3",
"@angular/router": "^18.2.3",
"@angular/service-worker": "^18.2.3",
"@commander-js/extra-typings": "^12.1.0",
"@nestjs/cli": "~10.4.2",
"@nestjs/schematics": "~10.1.3",
"@nestjs/testing": "~10.3.10",
"@nestjs/cli": "~10.4.5",
"@nestjs/schematics": "~10.1.4",
"@nestjs/testing": "~10.4.1",
"@types/cli-color": "~2.0.6",
"@types/fs-extra": "~11.0.4",
"@types/jest": "~29.5.12",
"@types/js-yaml": "~4.0.9",
"@types/markdown-it": "~14.1.2",
"@types/node": "~20.14.13",
"@types/node": "~20.14.15",
"@types/supertest": "~6.0.2",
"@typescript-eslint/eslint-plugin": "~7.18.0",
"@typescript-eslint/parser": "~7.18.0",
"dotenv": "^16.4.5",
"esbuild": "^0.23.0",
"eslint": "~8.57.0",
"esbuild": "^0.23.1",
"eslint": "~9.9.1",
"eslint-config-prettier": "~9.1.0",
"eslint-plugin-prettier": "~5.2.1",
"fflate": "^0.8.2",
"jest": "~29.7.0",
"jest-to-match-shape-of": "~1.3.2",
"material-design-icons": "^3.0.1",
"prettier": "~3.3.3",
"rimraf": "~6.0.1",
"supertest": "~7.0.0",
"ts-jest": "~29.2.3",
"type-fest": "~4.23.0",
"ts-jest": "~29.2.5",
"type-fest": "~4.26.0",
"typescript": "~5.4.5",
"zone.js": "~0.14.8"
"typescript-eslint": "~8.4.0",
"zone.js": "~0.14.10"
}
}
Loading

0 comments on commit 861c783

Please sign in to comment.