mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
chore: update silverhand/configs dependency and fix the scope of eslint-disable rule (#157)
* chore: fix the scope of eslint-disable rule * chore: update silverhand/configs to v0.5.0 and fix linting error accordingly * chore: fix linting error
This commit is contained in:
parent
3a80d99c9f
commit
7ff8550845
9 changed files with 49 additions and 58 deletions
|
@ -46,8 +46,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@shopify/jest-koa-mocks": "^3.0.8",
|
||||
"@silverhand/eslint-config": "^0.4.0",
|
||||
"@silverhand/ts-config": "^0.4.0",
|
||||
"@silverhand/eslint-config": "^0.5.0",
|
||||
"@silverhand/ts-config": "^0.5.0",
|
||||
"@types/jest": "^27.0.1",
|
||||
"@types/koa": "^2.13.3",
|
||||
"@types/koa-logger": "^3.1.1",
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable sql/no-unsafe-query */
|
||||
import { UserDBEntry, Users } from '@logto/schemas';
|
||||
import decamelize from 'decamelize';
|
||||
|
||||
|
@ -10,10 +9,12 @@ import { convertToIdentifiers, excludeAutoSetFields } from './utils';
|
|||
|
||||
describe('buildInsertInto()', () => {
|
||||
const keys = excludeAutoSetFields(Users.fieldKeys);
|
||||
/* eslint-disable sql/no-unsafe-query */
|
||||
const expectInsertIntoSql = [
|
||||
`insert into "users" (${keys.map((key) => `"${decamelize(key)}"`).join(', ')})`,
|
||||
`values (${keys.map((_, index) => `$${index + 1}`).join(', ')})`,
|
||||
];
|
||||
/* eslint-enable sql/no-unsafe-query */
|
||||
|
||||
it('resolves a promise with `undefined` when `returning` is false', async () => {
|
||||
const pool = createTestPool(expectInsertIntoSql.join('\n'));
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
/* eslint-disable import/first */
|
||||
import 'module-alias/register.js';
|
||||
|
||||
import dotenv from 'dotenv';
|
||||
import Koa from 'koa';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
import initApp from './app/init';
|
||||
import { trustingTlsOffloadingProxies } from './env/consts';
|
||||
import initI18n from './i18n/init';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = new Koa({
|
||||
proxy: trustingTlsOffloadingProxies,
|
||||
});
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
"url": "https://github.com/logto-io/logto/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@silverhand/eslint-config": "^0.4.0",
|
||||
"@silverhand/ts-config": "^0.4.0",
|
||||
"@silverhand/eslint-config": "^0.5.0",
|
||||
"@silverhand/ts-config": "^0.5.0",
|
||||
"eslint": "^8.1.0",
|
||||
"lint-staged": "^11.1.1",
|
||||
"prettier": "^2.3.2",
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
/* eslint-disable @typescript-eslint/consistent-indexed-object-style */
|
||||
|
||||
/* Copied from i18next/index.d.ts */
|
||||
export interface Resource {
|
||||
[language: string]: ResourceLanguage;
|
||||
}
|
||||
export type Resource = Record<string, ResourceLanguage>;
|
||||
|
||||
export interface ResourceLanguage {
|
||||
[namespace: string]: ResourceKey;
|
||||
}
|
||||
export type ResourceLanguage = Record<string, ResourceKey>;
|
||||
|
||||
export type ResourceKey =
|
||||
| string
|
||||
| {
|
||||
[key: string]: any;
|
||||
};
|
||||
export type ResourceKey = string | Record<string, any>;
|
||||
|
||||
/* Copied from react-i18next/ts4.1/index.d.ts */
|
||||
// Normalize single namespace
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
"node": ">=14.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@silverhand/eslint-config": "^0.4.0",
|
||||
"@silverhand/eslint-config": "^0.5.0",
|
||||
"@silverhand/essentials": "^1.1.0",
|
||||
"@silverhand/ts-config": "^0.4.0",
|
||||
"@silverhand/ts-config": "^0.5.0",
|
||||
"@types/lodash.uniq": "^4.5.6",
|
||||
"@types/node": "14",
|
||||
"@types/pluralize": "^0.0.29",
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
"devDependencies": {
|
||||
"@babel/core": "^7.14.6",
|
||||
"@jest/types": "^27.0.6",
|
||||
"@silverhand/eslint-config": "^0.4.0",
|
||||
"@silverhand/eslint-config-react": "^0.4.0",
|
||||
"@silverhand/ts-config": "^0.4.0",
|
||||
"@silverhand/ts-config-react": "^0.4.0",
|
||||
"@silverhand/eslint-config": "^0.5.0",
|
||||
"@silverhand/eslint-config-react": "^0.5.0",
|
||||
"@silverhand/ts-config": "^0.5.0",
|
||||
"@silverhand/ts-config-react": "^0.5.0",
|
||||
"@testing-library/react": "^12.0.0",
|
||||
"@types/jest": "^26.0.24",
|
||||
"@types/react": "^17.0.14",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* eslint-disable unicorn/prefer-module */
|
||||
import React from 'react';
|
||||
import { render, hydrate } from 'react-dom';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
|
||||
import App from './App';
|
||||
|
||||
/* eslint-disable unicorn/prefer-module */
|
||||
const renderFunction = module.hot ? render : hydrate;
|
||||
|
||||
renderFunction(
|
||||
|
@ -17,3 +17,4 @@ renderFunction(
|
|||
if (module.hot) {
|
||||
module.hot.accept();
|
||||
}
|
||||
/* eslint-enable unicorn/prefer-module */
|
||||
|
|
60
pnpm-lock.yaml
generated
60
pnpm-lock.yaml
generated
|
@ -23,9 +23,9 @@ importers:
|
|||
'@logto/phrases': ^0.1.0
|
||||
'@logto/schemas': ^0.1.0
|
||||
'@shopify/jest-koa-mocks': ^3.0.8
|
||||
'@silverhand/eslint-config': ^0.4.0
|
||||
'@silverhand/eslint-config': ^0.5.0
|
||||
'@silverhand/essentials': ^1.1.0
|
||||
'@silverhand/ts-config': ^0.4.0
|
||||
'@silverhand/ts-config': ^0.5.0
|
||||
'@types/jest': ^27.0.1
|
||||
'@types/koa': ^2.13.3
|
||||
'@types/koa-logger': ^3.1.1
|
||||
|
@ -98,8 +98,8 @@ importers:
|
|||
zod: 3.11.6
|
||||
devDependencies:
|
||||
'@shopify/jest-koa-mocks': 3.0.8
|
||||
'@silverhand/eslint-config': 0.4.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/ts-config': 0.4.0_typescript@4.5.3
|
||||
'@silverhand/eslint-config': 0.5.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/ts-config': 0.5.0_typescript@4.5.3
|
||||
'@types/jest': 27.0.3
|
||||
'@types/koa': 2.13.4
|
||||
'@types/koa-logger': 3.1.2
|
||||
|
@ -121,15 +121,15 @@ importers:
|
|||
|
||||
packages/phrases:
|
||||
specifiers:
|
||||
'@silverhand/eslint-config': ^0.4.0
|
||||
'@silverhand/ts-config': ^0.4.0
|
||||
'@silverhand/eslint-config': ^0.5.0
|
||||
'@silverhand/ts-config': ^0.5.0
|
||||
eslint: ^8.1.0
|
||||
lint-staged: ^11.1.1
|
||||
prettier: ^2.3.2
|
||||
typescript: ^4.3.5
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 0.4.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/ts-config': 0.4.0_typescript@4.5.3
|
||||
'@silverhand/eslint-config': 0.5.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/ts-config': 0.5.0_typescript@4.5.3
|
||||
eslint: 8.4.1
|
||||
lint-staged: 11.2.6
|
||||
prettier: 2.5.1
|
||||
|
@ -138,9 +138,9 @@ importers:
|
|||
packages/schemas:
|
||||
specifiers:
|
||||
'@logto/phrases': ^0.1.0
|
||||
'@silverhand/eslint-config': ^0.4.0
|
||||
'@silverhand/eslint-config': ^0.5.0
|
||||
'@silverhand/essentials': ^1.1.0
|
||||
'@silverhand/ts-config': ^0.4.0
|
||||
'@silverhand/ts-config': ^0.5.0
|
||||
'@types/lodash.uniq': ^4.5.6
|
||||
'@types/node': '14'
|
||||
'@types/pluralize': ^0.0.29
|
||||
|
@ -157,9 +157,9 @@ importers:
|
|||
'@logto/phrases': link:../phrases
|
||||
zod: 3.11.6
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 0.4.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/eslint-config': 0.5.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/essentials': 1.1.2
|
||||
'@silverhand/ts-config': 0.4.0_typescript@4.5.3
|
||||
'@silverhand/ts-config': 0.5.0_typescript@4.5.3
|
||||
'@types/lodash.uniq': 4.5.6
|
||||
'@types/node': 14.18.0
|
||||
'@types/pluralize': 0.0.29
|
||||
|
@ -178,10 +178,10 @@ importers:
|
|||
'@jest/types': ^27.0.6
|
||||
'@logto/phrases': ^0.1.0
|
||||
'@logto/schemas': ^0.1.0
|
||||
'@silverhand/eslint-config': ^0.4.0
|
||||
'@silverhand/eslint-config-react': ^0.4.0
|
||||
'@silverhand/ts-config': ^0.4.0
|
||||
'@silverhand/ts-config-react': ^0.4.0
|
||||
'@silverhand/eslint-config': ^0.5.0
|
||||
'@silverhand/eslint-config-react': ^0.5.0
|
||||
'@silverhand/ts-config': ^0.5.0
|
||||
'@silverhand/ts-config-react': ^0.5.0
|
||||
'@testing-library/react': ^12.0.0
|
||||
'@types/jest': ^26.0.24
|
||||
'@types/react': ^17.0.14
|
||||
|
@ -229,10 +229,10 @@ importers:
|
|||
devDependencies:
|
||||
'@babel/core': 7.16.0
|
||||
'@jest/types': 27.4.2
|
||||
'@silverhand/eslint-config': 0.4.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/eslint-config-react': 0.4.0_9d4efdeaabe00e4de1f3b58f5988ea20
|
||||
'@silverhand/ts-config': 0.4.0_typescript@4.5.3
|
||||
'@silverhand/ts-config-react': 0.4.0_typescript@4.5.3
|
||||
'@silverhand/eslint-config': 0.5.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/eslint-config-react': 0.5.0_9d4efdeaabe00e4de1f3b58f5988ea20
|
||||
'@silverhand/ts-config': 0.5.0_typescript@4.5.3
|
||||
'@silverhand/ts-config-react': 0.5.0_typescript@4.5.3
|
||||
'@testing-library/react': 12.1.2_react-dom@17.0.2+react@17.0.2
|
||||
'@types/jest': 26.0.24
|
||||
'@types/react': 17.0.37
|
||||
|
@ -3067,12 +3067,12 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@silverhand/eslint-config-react/0.4.0_9d4efdeaabe00e4de1f3b58f5988ea20:
|
||||
resolution: {integrity: sha512-C0Sf3eajHXzrS/Nc4XJQv+1RGh3XJBJcUDb/W0JI9O4YVmC1zRsGanuzs+Vvd1uDcBzVqWVDjSH5GRw36IOonA==}
|
||||
/@silverhand/eslint-config-react/0.5.0_9d4efdeaabe00e4de1f3b58f5988ea20:
|
||||
resolution: {integrity: sha512-7tXIfktglyDAOyjjrZjhjFUGZaOQ6AzcOHTZS2TwVxiQ9T0PH7DkJ5WWUQJMGbLicahUMRAVG/OGiQ63foIRdw==}
|
||||
peerDependencies:
|
||||
stylelint: ^13.13.1
|
||||
dependencies:
|
||||
'@silverhand/eslint-config': 0.4.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
'@silverhand/eslint-config': 0.5.0_1462fc7e3c7b4386daba890f6c2395d0
|
||||
eslint-config-xo-react: 0.25.0_0d0b684468c8c3b6dac037452254bcd4
|
||||
eslint-plugin-react: 7.27.1_eslint@8.4.1
|
||||
eslint-plugin-react-hooks: 4.3.0_eslint@8.4.1
|
||||
|
@ -3085,8 +3085,8 @@ packages:
|
|||
- typescript
|
||||
dev: true
|
||||
|
||||
/@silverhand/eslint-config/0.4.0_1462fc7e3c7b4386daba890f6c2395d0:
|
||||
resolution: {integrity: sha512-ivaUaS1S6w6EZ+K+anZYTJMCDkzP4DxF2aMEo6jndBkAA0/W9CGyQ4fmnLuRamgeE0OzzNpeYRQOaDmLLEEXvA==}
|
||||
/@silverhand/eslint-config/0.5.0_1462fc7e3c7b4386daba890f6c2395d0:
|
||||
resolution: {integrity: sha512-ol8g72c3Qsq+MmpIoQ62alex9R0KaPAiI5Tk3I8QavU7JLY0XSK76ShQtQWOIomMjmEqbsI1p5JWhaTUvHQ7tA==}
|
||||
engines: {node: '>=14.15.0'}
|
||||
peerDependencies:
|
||||
eslint: ^8.1.0
|
||||
|
@ -3136,18 +3136,18 @@ packages:
|
|||
lodash.orderby: 4.6.0
|
||||
lodash.pick: 4.4.0
|
||||
|
||||
/@silverhand/ts-config-react/0.4.0_typescript@4.5.3:
|
||||
resolution: {integrity: sha512-8D/VFFFGDrOf4zspfkvasXViOpwC+S/VrJx/rHD7Ztbn8+HPeHQRZeykXI2Tgg/G8cBkmlhW9ufrtCBYElJd+g==}
|
||||
/@silverhand/ts-config-react/0.5.0_typescript@4.5.3:
|
||||
resolution: {integrity: sha512-F/BmV6ek/5ExrdnoE3CvmO/LMPZaOTioEkFPIUjqydQbY7XOTVE8knk8cWCXLCe4WnotI4M3/WJXR0Zm4rljXw==}
|
||||
engines: {node: '>=14.15.0'}
|
||||
peerDependencies:
|
||||
typescript: ^4.3.5
|
||||
dependencies:
|
||||
'@silverhand/ts-config': 0.4.0_typescript@4.5.3
|
||||
'@silverhand/ts-config': 0.5.0_typescript@4.5.3
|
||||
typescript: 4.5.3
|
||||
dev: true
|
||||
|
||||
/@silverhand/ts-config/0.4.0_typescript@4.5.3:
|
||||
resolution: {integrity: sha512-OqzXXl21RLSfVbBeCqqyX850N6/aFZgJdQL3jwGioDMOiviXk9OfgN0l0ooLBjqUc6t65QR5g2IMJ95ddhOyEw==}
|
||||
/@silverhand/ts-config/0.5.0_typescript@4.5.3:
|
||||
resolution: {integrity: sha512-FM9hDlrVYoW35xqcJ3a8Us6jTC84e4Y4h/9EgTvw4gOdQG5ePoaoDmVHcuaro2sAH1aktLeXUAjePtVK48EP/A==}
|
||||
engines: {node: '>=14.15.0'}
|
||||
peerDependencies:
|
||||
typescript: ^4.3.5
|
||||
|
|
Loading…
Add table
Reference in a new issue