Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 28, 2022
1 parent 50d21d1 commit 055dedb
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 40 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@sindresorhus/tsconfig": "~0.7.0",
"expect-type": "^0.15.0",
"tsd": "^0.24.1",
"typescript": "^4.8.4",
"xo": "^0.52.4"
"typescript": "^4.9.3",
"xo": "^0.53.1"
},
"xo": {
"rules": {
Expand Down
14 changes: 0 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,6 @@
</sub>
</div>
</a>
<br>
<br>
<a href="https://sizzy.co/?utm_campaign=github_repo&utm_source=github&utm_medium=referral&utm_content=type-fest&utm_term=sindre">
<div>
<img src="https://sindresorhus.com/assets/thanks/sizzy-logo.png" width="240" alt="Sizzy">
</div>
<div>
<sub>
<b>Before Sizzy:</b> web development is stressing you out, responsive design is hard, you have an overwhelming amount of opened tabs & apps.
<br>
<b>After Sizzy:</b> all the tools you need in one place, responsive design is a breeze, no more context switching.
</sub>
</div>
</a>
</p>
</div>
<br>
Expand Down
5 changes: 3 additions & 2 deletions script/test/source-files-extension.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable unicorn/prefer-module */
const fs = require('fs');
const process = require('process');
const fs = require('node:fs');
const process = require('node:process');

const checkSourceFilesExtension = async () => {
try {
Expand All @@ -23,4 +23,5 @@ const checkSourceFilesExtension = async () => {
}
};

// eslint-disable-next-line unicorn/prefer-top-level-await
checkSourceFilesExtension();
8 changes: 3 additions & 5 deletions test-d/async-return-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ async function asyncFunction(): Promise<number> {

type Value = AsyncReturnType<typeof asyncFunction>;

// eslint-disable-next-line @typescript-eslint/no-floating-promises
asyncFunction().then(value => {
expectType<Value>(value);
expectNotAssignable<string>(value);
});
const value = await asyncFunction();
expectType<Value>(value);
expectNotAssignable<string>(value);
6 changes: 3 additions & 3 deletions test-d/camel-cased-properties-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ const result: CamelCasedPropertiesDeep<UserWithFriends> = {
userId: 1,
userName: 'Tom',
date: new Date(),
regExp: new RegExp(/.*/),
regExp: /.*/,
},
userFriends: [
{
userId: 2,
userName: 'Jerry',
date: new Date(),
regExp: new RegExp(/.*/),
regExp: /.*/,
},
{
userId: 3,
userName: 'Spike',
date: new Date(),
regExp: new RegExp(/.*/),
regExp: /.*/,
},
],
};
Expand Down
6 changes: 3 additions & 3 deletions test-d/delimiter-cased-properties-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ const result: DelimiterCasedPropertiesDeep<UserWithFriends, '-'> = {
'user-id': 1,
'user-name': 'Tom',
date: new Date(),
'reg-exp': new RegExp(/.*/),
'reg-exp': /.*/,
},
'user-friends': [
{
'user-id': 2,
'user-name': 'Jerry',
date: new Date(),
'reg-exp': new RegExp(/.*/),
'reg-exp': /.*/,
},
{
'user-id': 3,
'user-name': 'Spike',
date: new Date(),
'reg-exp': new RegExp(/.*/),
'reg-exp': /.*/,
},
],
};
Expand Down
6 changes: 3 additions & 3 deletions test-d/kebab-cased-properties-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ const result: KebabCasedPropertiesDeep<UserWithFriends> = {
'user-id': 1,
'user-name': 'Tom',
date: new Date(),
'reg-exp': new RegExp(/.*/),
'reg-exp': /.*/,
},
'user-friends': [
{
'user-id': 2,
'user-name': 'Jerry',
date: new Date(),
'reg-exp': new RegExp(/.*/),
'reg-exp': /.*/,
},
{
'user-id': 3,
'user-name': 'Spike',
date: new Date(),
'reg-exp': new RegExp(/.*/),
'reg-exp': /.*/,
},
],
};
Expand Down
2 changes: 1 addition & 1 deletion test-d/partial-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const foo = {
number: 1,
boolean: false,
date: new Date(),
regexp: new RegExp(/.*/),
regexp: /.*/,
symbol: Symbol('test'),
null: null,
undefined: undefined, // eslint-disable-line object-shorthand
Expand Down
6 changes: 3 additions & 3 deletions test-d/pascal-cased-properties-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ const result: PascalCasedPropertiesDeep<UserWithFriends> = {
UserId: 1,
UserName: 'Tom',
Date: new Date(),
RegExp: new RegExp(/.*/),
RegExp: /.*/,
},
UserFriends: [
{
UserId: 2,
UserName: 'Jerry',
Date: new Date(),
RegExp: new RegExp(/.*/),
RegExp: /.*/,
},
{
UserId: 3,
UserName: 'Spike',
Date: new Date(),
RegExp: new RegExp(/.*/),
RegExp: /.*/,
},
],
};
Expand Down
2 changes: 1 addition & 1 deletion test-d/readonly-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const data = {
boolean: false,
symbol: Symbol('test'),
date: new Date(),
regExp: new RegExp(/.*/),
regExp: /.*/,
null: null,
undefined: undefined, // eslint-disable-line object-shorthand
map: new Map<string, string>(),
Expand Down
6 changes: 3 additions & 3 deletions test-d/snake-cased-properties-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ const result: SnakeCasedPropertiesDeep<UserWithFriends> = {
user_id: 1,
user_name: 'Tom',
date: new Date(),
reg_exp: new RegExp(/.*/),
reg_exp: /.*/,
},
user_friends: [
{
user_id: 2,
user_name: 'Jerry',
date: new Date(),
reg_exp: new RegExp(/.*/),
reg_exp: /.*/,
},
{
user_id: 3,
user_name: 'Spike',
date: new Date(),
reg_exp: new RegExp(/.*/),
reg_exp: /.*/,
},
],
};
Expand Down

0 comments on commit 055dedb

Please sign in to comment.