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

chore: lint-staged for all packages (#100)

This commit is contained in:
Gao Sun 2021-08-30 22:26:58 +08:00 committed by GitHub
parent ea4cfd0e59
commit 4be1bd3cad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 5 deletions

View file

@ -1,3 +0,0 @@
module.exports = {
'*.ts?(x)': ['eslint --cache --fix', () => 'tsc -p tsconfig.json --noEmit'],
};

View file

@ -16,6 +16,7 @@
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"precommit": "lint-staged",
"build": "rm -rf lib/ && tsc", "build": "rm -rf lib/ && tsc",
"lint": "eslint --ext .ts src", "lint": "eslint --ext .ts src",
"prepack": "pnpm build" "prepack": "pnpm build"
@ -27,6 +28,7 @@
"@logto/eslint-config": "^0.1.0-rc.24", "@logto/eslint-config": "^0.1.0-rc.24",
"@logto/ts-config": "^0.1.0-rc.24", "@logto/ts-config": "^0.1.0-rc.24",
"eslint": "^7.31.0", "eslint": "^7.31.0",
"lint-staged": "^11.1.1",
"prettier": "^2.3.2", "prettier": "^2.3.2",
"typescript": "^4.3.5" "typescript": "^4.3.5"
}, },

View file

@ -11,6 +11,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"precommit": "lint-staged",
"generate": "ts-node src/gen/index.ts && eslint \"src/db-entries/**\" --fix", "generate": "ts-node src/gen/index.ts && eslint \"src/db-entries/**\" --fix",
"build": "pnpm generate && rm -rf lib/ && tsc --p tsconfig.build.json", "build": "pnpm generate && rm -rf lib/ && tsc --p tsconfig.build.json",
"lint": "eslint --ext .ts src", "lint": "eslint --ext .ts src",
@ -28,6 +29,7 @@
"@types/pluralize": "^0.0.29", "@types/pluralize": "^0.0.29",
"camelcase": "^6.2.0", "camelcase": "^6.2.0",
"eslint": "^7.30.0", "eslint": "^7.30.0",
"lint-staged": "^11.1.1",
"lodash.uniq": "^4.5.0", "lodash.uniq": "^4.5.0",
"pluralize": "^8.0.0", "pluralize": "^8.0.0",
"prettier": "^2.3.2", "prettier": "^2.3.2",

View file

@ -114,12 +114,14 @@ importers:
'@logto/eslint-config': ^0.1.0-rc.24 '@logto/eslint-config': ^0.1.0-rc.24
'@logto/ts-config': ^0.1.0-rc.24 '@logto/ts-config': ^0.1.0-rc.24
eslint: ^7.31.0 eslint: ^7.31.0
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.24_2055f56ab8dafa07df5c7ad406c8a4ab
'@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c '@logto/ts-config': 0.1.0-rc.24_43787dd55a198a22e6c455f148105a9c
eslint: 7.31.0 eslint: 7.31.0
lint-staged: 11.1.1
prettier: 2.3.2 prettier: 2.3.2
typescript: 4.3.5 typescript: 4.3.5
@ -134,6 +136,7 @@ importers:
'@types/pluralize': ^0.0.29 '@types/pluralize': ^0.0.29
camelcase: ^6.2.0 camelcase: ^6.2.0
eslint: ^7.30.0 eslint: ^7.30.0
lint-staged: ^11.1.1
lodash.uniq: ^4.5.0 lodash.uniq: ^4.5.0
pluralize: ^8.0.0 pluralize: ^8.0.0
prettier: ^2.3.2 prettier: ^2.3.2
@ -151,6 +154,7 @@ importers:
'@types/pluralize': 0.0.29 '@types/pluralize': 0.0.29
camelcase: 6.2.0 camelcase: 6.2.0
eslint: 7.31.0 eslint: 7.31.0
lint-staged: 11.1.1
lodash.uniq: 4.5.0 lodash.uniq: 4.5.0
pluralize: 8.0.0 pluralize: 8.0.0
prettier: 2.3.2 prettier: 2.3.2
@ -10492,7 +10496,7 @@ packages:
resolution: {integrity: sha512-eTNGe6i78PSUUH2BZi1gZmGmNfb8IeN4z2OzMYxSZ1qnP1WXKn1E7D+OHwLbRDm/wQINnzIj0bsKJ6lLVSuZiQ==} resolution: {integrity: sha512-eTNGe6i78PSUUH2BZi1gZmGmNfb8IeN4z2OzMYxSZ1qnP1WXKn1E7D+OHwLbRDm/wQINnzIj0bsKJ6lLVSuZiQ==}
hasBin: true hasBin: true
dependencies: dependencies:
chalk: 4.1.1 chalk: 4.1.2
cli-truncate: 2.1.0 cli-truncate: 2.1.0
commander: 7.2.0 commander: 7.2.0
cosmiconfig: 7.0.0 cosmiconfig: 7.0.0
@ -10671,7 +10675,7 @@ packages:
resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==}
engines: {node: '>=10'} engines: {node: '>=10'}
dependencies: dependencies:
chalk: 4.1.1 chalk: 4.1.2
is-unicode-supported: 0.1.0 is-unicode-supported: 0.1.0
dev: true dev: true