0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

chore: enforce default export name on React files (#101)

This commit is contained in:
Gao Sun 2021-08-30 22:28:08 +08:00 committed by GitHub
parent 4be1bd3cad
commit bb040cbeee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 74 additions and 47 deletions

View file

@ -42,8 +42,8 @@
"zod": "^3.8.1" "zod": "^3.8.1"
}, },
"devDependencies": { "devDependencies": {
"@logto/eslint-config": "^0.1.0-rc.24", "@logto/eslint-config": "^0.1.0-rc.26",
"@logto/ts-config": "^0.1.0-rc.24", "@logto/ts-config": "^0.1.0-rc.26",
"@types/jest": "^27.0.1", "@types/jest": "^27.0.1",
"@types/koa": "^2.13.3", "@types/koa": "^2.13.3",
"@types/koa-logger": "^3.1.1", "@types/koa-logger": "^3.1.1",

View file

@ -25,8 +25,8 @@
"url": "https://github.com/logto-io/logto/issues" "url": "https://github.com/logto-io/logto/issues"
}, },
"devDependencies": { "devDependencies": {
"@logto/eslint-config": "^0.1.0-rc.24", "@logto/eslint-config": "^0.1.0-rc.26",
"@logto/ts-config": "^0.1.0-rc.24", "@logto/ts-config": "^0.1.0-rc.26",
"eslint": "^7.31.0", "eslint": "^7.31.0",
"lint-staged": "^11.1.1", "lint-staged": "^11.1.1",
"prettier": "^2.3.2", "prettier": "^2.3.2",

View file

@ -21,9 +21,9 @@
"node": ">=14.15.0" "node": ">=14.15.0"
}, },
"devDependencies": { "devDependencies": {
"@logto/eslint-config": "^0.1.0-rc.24", "@logto/eslint-config": "^0.1.0-rc.26",
"@logto/essentials": "^1.1.0-rc.2", "@logto/essentials": "^1.1.0-rc.2",
"@logto/ts-config": "^0.1.0-rc.24", "@logto/ts-config": "^0.1.0-rc.26",
"@types/lodash.uniq": "^4.5.6", "@types/lodash.uniq": "^4.5.6",
"@types/node": "14", "@types/node": "14",
"@types/pluralize": "^0.0.29", "@types/pluralize": "^0.0.29",

View file

@ -31,10 +31,10 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.14.6", "@babel/core": "^7.14.6",
"@jest/types": "^27.0.6", "@jest/types": "^27.0.6",
"@logto/eslint-config": "^0.1.0-rc.24", "@logto/eslint-config": "^0.1.0-rc.26",
"@logto/eslint-config-react": "^0.1.0-rc.24", "@logto/eslint-config-react": "^0.1.0-rc.26",
"@logto/ts-config": "^0.1.0-rc.24", "@logto/ts-config": "^0.1.0-rc.26",
"@logto/ts-config-react": "^0.1.0-rc.24", "@logto/ts-config-react": "^0.1.0-rc.26",
"@testing-library/react": "^12.0.0", "@testing-library/react": "^12.0.0",
"@types/jest": "^26.0.24", "@types/jest": "^26.0.24",
"@types/react": "^17.0.14", "@types/react": "^17.0.14",

View file

@ -3,7 +3,7 @@ import { Route, Switch } from 'react-router-dom';
import AppContent from './components/AppContent'; import AppContent from './components/AppContent';
import useTheme from './hooks/use-theme'; import useTheme from './hooks/use-theme';
import initI18n from './init/i18n'; import initI18n from './i18n/init';
import Consent from './pages/Consent'; import Consent from './pages/Consent';
import Register from './pages/Register'; import Register from './pages/Register';
import SignIn from './pages/SignIn'; import SignIn from './pages/SignIn';

View file

@ -20,11 +20,11 @@ importers:
packages/core: packages/core:
specifiers: specifiers:
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.26
'@logto/essentials': ^1.1.0-rc.2 '@logto/essentials': ^1.1.0-rc.2
'@logto/phrases': ^0.1.0 '@logto/phrases': ^0.1.0
'@logto/schemas': ^0.1.0 '@logto/schemas': ^0.1.0
'@logto/ts-config': ^0.1.0-rc.24 '@logto/ts-config': ^0.1.0-rc.26
'@types/jest': ^27.0.1 '@types/jest': ^27.0.1
'@types/koa': ^2.13.3 '@types/koa': ^2.13.3
'@types/koa-logger': ^3.1.1 '@types/koa-logger': ^3.1.1
@ -89,8 +89,8 @@ importers:
slonik-interceptor-preset: 1.2.10 slonik-interceptor-preset: 1.2.10
zod: 3.8.1 zod: 3.8.1
devDependencies: devDependencies:
'@logto/eslint-config': 0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab '@logto/eslint-config': 0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab
'@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c '@logto/ts-config': 0.1.0-rc.26_71f6e48bcb7d8cc850d476cd072a5370
'@types/jest': 27.0.1 '@types/jest': 27.0.1
'@types/koa': 2.13.4 '@types/koa': 2.13.4
'@types/koa-logger': 3.1.1 '@types/koa-logger': 3.1.1
@ -111,15 +111,15 @@ importers:
packages/phrases: packages/phrases:
specifiers: specifiers:
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.26
'@logto/ts-config': ^0.1.0-rc.24 '@logto/ts-config': ^0.1.0-rc.26
eslint: ^7.31.0 eslint: ^7.31.0
lint-staged: ^11.1.1 lint-staged: ^11.1.1
prettier: ^2.3.2 prettier: ^2.3.2
typescript: ^4.3.5 typescript: ^4.3.5
devDependencies: devDependencies:
'@logto/eslint-config': 0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab '@logto/eslint-config': 0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab
'@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c '@logto/ts-config': 0.1.0-rc.26_71f6e48bcb7d8cc850d476cd072a5370
eslint: 7.31.0 eslint: 7.31.0
lint-staged: 11.1.1 lint-staged: 11.1.1
prettier: 2.3.2 prettier: 2.3.2
@ -127,10 +127,10 @@ importers:
packages/schemas: packages/schemas:
specifiers: specifiers:
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.26
'@logto/essentials': ^1.1.0-rc.2 '@logto/essentials': ^1.1.0-rc.2
'@logto/phrases': ^0.1.0 '@logto/phrases': ^0.1.0
'@logto/ts-config': ^0.1.0-rc.24 '@logto/ts-config': ^0.1.0-rc.26
'@types/lodash.uniq': ^4.5.6 '@types/lodash.uniq': ^4.5.6
'@types/node': '14' '@types/node': '14'
'@types/pluralize': ^0.0.29 '@types/pluralize': ^0.0.29
@ -146,9 +146,9 @@ importers:
dependencies: dependencies:
'@logto/phrases': link:../phrases '@logto/phrases': link:../phrases
devDependencies: devDependencies:
'@logto/eslint-config': 0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab '@logto/eslint-config': 0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab
'@logto/essentials': 1.1.0-rc.2 '@logto/essentials': 1.1.0-rc.2
'@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c '@logto/ts-config': 0.1.0-rc.26_71f6e48bcb7d8cc850d476cd072a5370
'@types/lodash.uniq': 4.5.6 '@types/lodash.uniq': 4.5.6
'@types/node': 14.17.6 '@types/node': 14.17.6
'@types/pluralize': 0.0.29 '@types/pluralize': 0.0.29
@ -166,12 +166,12 @@ importers:
specifiers: specifiers:
'@babel/core': ^7.14.6 '@babel/core': ^7.14.6
'@jest/types': ^27.0.6 '@jest/types': ^27.0.6
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.26
'@logto/eslint-config-react': ^0.1.0-rc.24 '@logto/eslint-config-react': ^0.1.0-rc.26
'@logto/phrases': ^0.1.0 '@logto/phrases': ^0.1.0
'@logto/schemas': ^0.1.0 '@logto/schemas': ^0.1.0
'@logto/ts-config': ^0.1.0-rc.24 '@logto/ts-config': ^0.1.0-rc.26
'@logto/ts-config-react': ^0.1.0-rc.24 '@logto/ts-config-react': ^0.1.0-rc.26
'@testing-library/react': ^12.0.0 '@testing-library/react': ^12.0.0
'@types/jest': ^26.0.24 '@types/jest': ^26.0.24
'@types/react': ^17.0.14 '@types/react': ^17.0.14
@ -216,10 +216,10 @@ importers:
devDependencies: devDependencies:
'@babel/core': 7.14.8 '@babel/core': 7.14.8
'@jest/types': 27.0.6 '@jest/types': 27.0.6
'@logto/eslint-config': 0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab '@logto/eslint-config': 0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab
'@logto/eslint-config-react': 0.1.0-rc.24_3d86d47bd84fdbb75de6533b28633e70 '@logto/eslint-config-react': 0.1.0-rc.26_a3ddc8d99e81f5584d80cc4b67ab4c8a
'@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c '@logto/ts-config': 0.1.0-rc.26_71f6e48bcb7d8cc850d476cd072a5370
'@logto/ts-config-react': 0.1.0-rc.24_56e7b91bb27f2374270546bf6b655d4d '@logto/ts-config-react': 0.1.0-rc.26_6ee48860da0e38c770ff936c56519999
'@testing-library/react': 12.0.0_react-dom@17.0.2+react@17.0.2 '@testing-library/react': 12.0.0_react-dom@17.0.2+react@17.0.2
'@types/jest': 26.0.24 '@types/jest': 26.0.24
'@types/react': 17.0.15 '@types/react': 17.0.15
@ -2790,13 +2790,13 @@ packages:
write-file-atomic: 3.0.3 write-file-atomic: 3.0.3
dev: true dev: true
/@logto/eslint-config-react/0.1.0-rc.24_3d86d47bd84fdbb75de6533b28633e70: /@logto/eslint-config-react/0.1.0-rc.26_a3ddc8d99e81f5584d80cc4b67ab4c8a:
resolution: {integrity: sha512-0telwVjuHOpfbTMFJ6xwRPwhDgpEFPOThM/pvKhh9Yy8sqS76ITC7S+0N3jyQjnRUId/ut0q9EYiTqtKrJ/W+g==} resolution: {integrity: sha512-8tye/S3d/kVugPZfFA2RzYSoPCkIJkREG2SMMGBCW4oeWdY9nu+EXi7z8WaijE3ZHvfUCndcOyrWHyOr8oYc4g==}
peerDependencies: peerDependencies:
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.26
stylelint: ^13.13.1 stylelint: ^13.13.1
dependencies: dependencies:
'@logto/eslint-config': 0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab '@logto/eslint-config': 0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab
eslint-config-xo-react: 0.25.0_5f704e3662965de4cfb2bcc40a24fdc0 eslint-config-xo-react: 0.25.0_5f704e3662965de4cfb2bcc40a24fdc0
eslint-plugin-react: 7.25.0_eslint@7.31.0 eslint-plugin-react: 7.25.0_eslint@7.31.0
eslint-plugin-react-hooks: 4.2.0_eslint@7.31.0 eslint-plugin-react-hooks: 4.2.0_eslint@7.31.0
@ -2806,8 +2806,8 @@ packages:
- eslint - eslint
dev: true dev: true
/@logto/eslint-config/0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab: /@logto/eslint-config/0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab:
resolution: {integrity: sha512-dmIg0AwhFczqhq54OikElhNlcyS3iXnTIpPxdhkZfql8LpydDYizpDwE5gl/tcEGiI152ZfwWw+8lYcyQatfUA==} resolution: {integrity: sha512-QSy1EAQ9elaLSQ5B7EzdPjonuP5aW0i5R6V/C12Rlkb6+EqOtB6HKkT/xeXYBmkuqCTQHvVZ8AfebLZzphEuZQ==}
engines: {node: '>=14.15.0'} engines: {node: '>=14.15.0'}
peerDependencies: peerDependencies:
eslint: ^7.30.0 eslint: ^7.30.0
@ -2821,6 +2821,7 @@ packages:
eslint-config-xo: 0.37.0_eslint@7.31.0 eslint-config-xo: 0.37.0_eslint@7.31.0
eslint-config-xo-typescript: 0.43.0_5e94fa9d17795ac650ba73b69f3de816 eslint-config-xo-typescript: 0.43.0_5e94fa9d17795ac650ba73b69f3de816
eslint-import-resolver-typescript: 2.4.0_ad16af91e8fab94a7e22e925abb31583 eslint-import-resolver-typescript: 2.4.0_ad16af91e8fab94a7e22e925abb31583
eslint-plugin-consistent-default-export-name: 0.0.7
eslint-plugin-eslint-comments: 3.2.0_eslint@7.31.0 eslint-plugin-eslint-comments: 3.2.0_eslint@7.31.0
eslint-plugin-import: 2.24.2_eslint@7.31.0 eslint-plugin-import: 2.24.2_eslint@7.31.0
eslint-plugin-no-use-extend-native: 0.5.0 eslint-plugin-no-use-extend-native: 0.5.0
@ -2841,27 +2842,27 @@ packages:
lodash.orderby: 4.6.0 lodash.orderby: 4.6.0
lodash.pick: 4.4.0 lodash.pick: 4.4.0
/@logto/ts-config-react/0.1.0-rc.24_56e7b91bb27f2374270546bf6b655d4d: /@logto/ts-config-react/0.1.0-rc.26_6ee48860da0e38c770ff936c56519999:
resolution: {integrity: sha512-nwbNoI3XXARR7qg3qCYmeLU3yD4V4BSogXAk6Ge6CIIb0aPoj/27wCknq1edjwaInxPR3J6ZXmicQqHokdZ30g==} resolution: {integrity: sha512-H9+yiU8VtQzL7YHq30lyPl7L/S//gmUYN9zq3Ro10cNRL7p2Y6lx1tCpEcn/zG/Y7yzLk45D6MQ8fOf4PA8a8Q==}
engines: {node: '>=14.15.0'} engines: {node: '>=14.15.0'}
peerDependencies: peerDependencies:
'@logto/eslint-config-react': ^0.1.0-rc.24 '@logto/eslint-config-react': ^0.1.0-rc.26
'@logto/ts-config': ^0.1.0-rc.24 '@logto/ts-config': ^0.1.0-rc.26
typescript: ^4.3.5 typescript: ^4.3.5
dependencies: dependencies:
'@logto/eslint-config-react': 0.1.0-rc.24_3d86d47bd84fdbb75de6533b28633e70 '@logto/eslint-config-react': 0.1.0-rc.26_a3ddc8d99e81f5584d80cc4b67ab4c8a
'@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c '@logto/ts-config': 0.1.0-rc.26_71f6e48bcb7d8cc850d476cd072a5370
typescript: 4.3.5 typescript: 4.3.5
dev: true dev: true
/@logto/ts-config/0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c: /@logto/ts-config/0.1.0-rc.26_71f6e48bcb7d8cc850d476cd072a5370:
resolution: {integrity: sha512-cjL0oStG1BYJzbT80MgR/XECaoUUyQ44IJavRNETZ8ngmg375HRoM2DQlmlNXwIlGmlbWR21VIohIhd89FANDQ==} resolution: {integrity: sha512-EJDAlEBjZB17Yzgv3F28yG15K9ZnDdReKX5Ra0dEv2WyfXSGxM11fktNIIjgFiuOwk8w2De1HnXJ+9NTpJOZYQ==}
engines: {node: '>=14.15.0'} engines: {node: '>=14.15.0'}
peerDependencies: peerDependencies:
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.26
typescript: ^4.3.5 typescript: ^4.3.5
dependencies: dependencies:
'@logto/eslint-config': 0.1.0-rc.24_2055f56ab8dafa07df5c7ad406c8a4ab '@logto/eslint-config': 0.1.0-rc.26_2055f56ab8dafa07df5c7ad406c8a4ab
typescript: 4.3.5 typescript: 4.3.5
dev: true dev: true
@ -6757,6 +6758,16 @@ packages:
pkg-dir: 2.0.0 pkg-dir: 2.0.0
dev: true dev: true
/eslint-plugin-consistent-default-export-name/0.0.7:
resolution: {integrity: sha512-5gQqnXniMBCzB4TTai/XX28CLgfSk2/bb9GYD5DiuIKlEUSklLdB068nq9zwG3808pjPFlYTm0dLyRk/qDolaQ==}
engines: {node: '>=0.10.0'}
dependencies:
lodash.camelcase: 4.3.0
lodash.kebabcase: 4.1.1
lodash.snakecase: 4.1.1
lodash.upperfirst: 4.3.1
dev: true
/eslint-plugin-es/3.0.1_eslint@7.31.0: /eslint-plugin-es/3.0.1_eslint@7.31.0:
resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==}
engines: {node: '>=8.10.0'} engines: {node: '>=8.10.0'}
@ -10617,6 +10628,10 @@ packages:
resolution: {integrity: sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=} resolution: {integrity: sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=}
dev: true dev: true
/lodash.camelcase/4.3.0:
resolution: {integrity: sha1-soqmKIorn8ZRA1x3EfZathkDMaY=}
dev: true
/lodash.clonedeep/4.5.0: /lodash.clonedeep/4.5.0:
resolution: {integrity: sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=} resolution: {integrity: sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=}
dev: true dev: true
@ -10629,6 +10644,10 @@ packages:
resolution: {integrity: sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=} resolution: {integrity: sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=}
dev: true dev: true
/lodash.kebabcase/4.1.1:
resolution: {integrity: sha1-hImxyw0p/4gZXM7KRI/21swpXDY=}
dev: true
/lodash.memoize/4.1.2: /lodash.memoize/4.1.2:
resolution: {integrity: sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=} resolution: {integrity: sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=}
dev: true dev: true
@ -10643,6 +10662,10 @@ packages:
/lodash.pick/4.4.0: /lodash.pick/4.4.0:
resolution: {integrity: sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=} resolution: {integrity: sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=}
/lodash.snakecase/4.1.1:
resolution: {integrity: sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=}
dev: true
/lodash.sortby/4.7.0: /lodash.sortby/4.7.0:
resolution: {integrity: sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=} resolution: {integrity: sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=}
dev: false dev: false
@ -10668,6 +10691,10 @@ packages:
resolution: {integrity: sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=} resolution: {integrity: sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=}
dev: true dev: true
/lodash.upperfirst/4.3.1:
resolution: {integrity: sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=}
dev: true
/lodash/4.17.21: /lodash/4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}