Skip to content

Commit 32377a6

Browse files
committed
chore: lint
1 parent 3549f31 commit 32377a6

File tree

169 files changed

+1384
-1411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+1384
-1411
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

.github/ISSUE_TEMPLATE/0-new.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Basic info of your challenge questions,
1616
```yaml
1717
difficulty: easy # medium / hard / extreme
1818
title: Your Question Name
19-
#tags: union, array # separate by comma
19+
# tags: union, array # separate by comma
2020
```
2121

2222
## Question
@@ -40,7 +40,8 @@ type YourType = any
4040
Provide some test cases for your challenge, you can use some utils from `@type-challenges/utils` for asserting.
4141
4242
```ts
43-
import { Equal, Expect, ExpectFalse, NotEqual } from '@type-challenges/utils'
43+
import type { Equal, Expect } from '@type-challenges/utils'
44+
import { ExpectFalse, NotEqual } from '@type-challenges/utils'
4445

4546
type cases = [
4647
Expect<Equal<true, true>>

.github/ISSUE_TEMPLATE/1-new.ja.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ difficulty: easy # medium / hard / extreme
1919
title: 課題のタイトル
2020

2121
# タグ
22-
#tags: union, array # separate by comma
22+
# tags: union, array # separate by comma
2323
```
2424

2525
## 質問
@@ -43,7 +43,8 @@ type YourType = any
4343
あなたの課題のテストケースです。`@type-challenges/utils`が提供するいくつかのアサーションを使うことが出来ます。
4444
4545
```ts
46-
import { Equal, Expect, ExpectFalse, NotEqual } from '@type-challenges/utils'
46+
import type { Equal, Expect } from '@type-challenges/utils'
47+
import { ExpectFalse, NotEqual } from '@type-challenges/utils'
4748

4849
type cases = [
4950
Expect<Equal<true, true>>

.github/ISSUE_TEMPLATE/1-new.zh-CN.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ difficulty: easy # medium / hard / extreme
2020
title: 你的题目
2121

2222
# 题目标签
23-
#tags: union, array # separate by comma
23+
# tags: union, array # separate by comma
2424
```
2525

2626
## 题目
@@ -44,7 +44,8 @@ type YourType = any
4444
请为你的题目提供一些判题测试,你可以使用 `@type-challenges/utils` 中提供的一些工具进行判断。
4545
4646
```ts
47-
import { Equal, Expect, ExpectFalse, NotEqual } from '@type-challenges/utils'
47+
import type { Equal, Expect } from '@type-challenges/utils'
48+
import { ExpectFalse, NotEqual } from '@type-challenges/utils'
4849

4950
type cases = [
5051
Expect<Equal<true, true>>

.github/workflows/index-update.yaml

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ name: Index Update
33
on:
44
schedule:
55
- cron: '0 0 * * *'
6-
workflow_dispatch:
6+
workflow_dispatch: {}
77

88
jobs:
99
start:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- run: npx pnpm i
14-
- name: 'Update README index'
13+
- uses: pnpm/[email protected]
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 16.x
17+
cache: pnpm
18+
- name: Update README index
1519
run: npm run readme
16-
- name: 'Lint fix'
20+
- name: Lint fix
1721
run: npm run lint -- --fix
1822
- uses: EndBug/add-and-commit@v9
1923
with:

.github/workflows/labeling.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- run: cd scripts && npm i --only=production
1313
- run: cd scripts/actions && npx esno ./loader.ts ${{github.token}} labeling
14-

.github/workflows/toggle-pr-with-issue.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- run: cd scripts && npm i --only=production
1313
- run: cd scripts/actions && npx esno ./loader.ts ${{github.token}} toggle-pr-with-issue
14-

.vscode/i18n-ally-custom-framework.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ usageMatchRegex:
1515
# The following example shows how to detect `t("your.i18n.keys")`
1616
# the `{key}` will be placed by a proper keypath matching regex,
1717
# you can ignore it and use your own matching rules as well
18-
- "t\\(\\w+?, ['\"`]({key})['\"`]\\)"
19-
18+
- 't\(\w+?, [''"`]({key})[''"`]\)'
2019

2120
# An array of strings containing refactor templates.
2221
# The "$1" will be replaced by the keypath specified.
2322
# Optional: uncomment the following two lines to use
2423

2524
refactorTemplates:
26-
- t(locale, "$1")
27-
25+
- t(locale, "$1")
2826

2927
# If set to true, only enables this custom framework (will disable all built-in frameworks)
30-
monopoly: true
28+
monopoly: true

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"prettier.semi": false,
1818
"typescript.format.semicolons": "remove",
1919
"javascript.format.semicolons": "remove"
20-
}
20+
}

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "type-challenges",
3-
"private": true,
43
"version": "0.0.0",
4+
"private": true,
5+
"packageManager": "[email protected]",
56
"license": "MIT",
6-
"repository": "https://github.com/antfu/type-challenges.git",
77
"author": "Anthony Fu <[email protected]>",
8+
"repository": "https://github.com/antfu/type-challenges.git",
89
"scripts": {
910
"readme": "esno ./scripts/readme.ts",
1011
"build": "esno ./scripts/build.ts",
@@ -38,10 +39,12 @@
3839
"import/first": "off",
3940
"no-unused-vars": "off",
4041
"@typescript-eslint/no-unused-vars": "off",
42+
"@typescript-eslint/ban-ts-comment": "off",
4143
"no-use-before-define": "off",
4244
"no-unused-expressions": "off",
4345
"prefer-const": "off",
44-
"no-alert": "off"
46+
"no-alert": "off",
47+
"@typescript-eslint/consistent-type-definitions": "off"
4548
}
4649
}
4750
}

0 commit comments

Comments
 (0)