Skip to content

Commit 9ffbaae

Browse files
committed
fix: changed lib from js to ts
Signed-off-by: prisis <[email protected]>
1 parent dc44699 commit 9ffbaae

File tree

11 files changed

+426
-415
lines changed

11 files changed

+426
-415
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"packages/*"
5555
],
5656
"scripts": {
57-
"build:packages": "pnpm --filter \"package-json-utils\" run build && nx run-many --target=build --projects=browserslist-config-anolilab,babel-preset,prettier-config",
58-
"build:prod:packages": "pnpm --filter \"package-json-utils\" run build:prod && nx run-many --target=build:prod --projects=browserslist-config-anolilab,babel-preset,prettier-config",
57+
"build:packages": "pnpm --filter \"package-json-utils\" run build && nx run-many --target=build --projects=browserslist-config-anolilab,babel-preset,prettier-config,textlint-config",
58+
"build:prod:packages": "pnpm --filter \"package-json-utils\" run build:prod && nx run-many --target=build:prod --projects=browserslist-config-anolilab,babel-preset,prettier-config,textlint-config",
5959
"preinstall": "node verify-node-version.cjs",
6060
"postinstall": "is-ci || husky install",
6161
"lint:eslint": "cross-env NO_LOGS=true eslint -c ./.eslintrc.cjs --ext .js,.cjs,.mjs,.ts,.tsx ./packages --cache --cache-strategy content .",

packages/textlint-config/README.md

Lines changed: 140 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -20,157 +20,156 @@ Anolilab Coding Standard for text linting.
2020
npm install --dev-save @anolilab/textlint-config textlint
2121
```
2222

23+
```sh
24+
$ yarn add -D @anolilab/textlint-config textlint
25+
```
26+
27+
```sh
28+
$ pnpm add -D @anolilab/textlint-config textlint
29+
```
30+
2331
## Usage
2432

2533
If you don’t have a `.textlintrc`, we will create the file for you after installing `@anolilab/textlint-config`.
2634

2735
If you already have a `.textlintrc`, then you can extend the `.textlintrc`, with `@anolilab/textlint-config`.
2836

29-
```text
37+
```json5
3038
{
31-
"filters": {
32-
"comments": true
33-
},
34-
"rules": {
35-
"en-capitalization": true,
36-
"footnote-order": true,
37-
"no-todo": true,
38-
"no-dead-link": {
39-
"ignore": [
40-
"bc_data_*",
41-
]
42-
},
43-
"no-empty-section": true,
44-
"terminology": true,
45-
"apostrophe": true,
46-
"diacritics": true,
47-
"@textlint-rule/no-invalid-control-character": true,
48-
"@textlint-rule/no-unmatched-pair": true,
49-
"abbr-within-parentheses": true,
50-
"alex": {
51-
"allow": [
52-
"period",
53-
"european",
54-
"failure",
55-
"fore",
56-
"attack",
57-
"execution",
58-
"executed",
59-
"remain",
60-
"execute"
61-
]
39+
"@textlint/markdown": {
40+
"extensions": [".md", ".mdx"]
6241
},
63-
"@textlint-rule/preset-google": true,
64-
"write-good": {
65-
"passive": false,
66-
"eprime": false,
42+
"filters": {
43+
"comments": true
6744
},
68-
"common-misspellings": true,
69-
"terminology": {
70-
"defaultTerms": false,
71-
"terms": [
72-
// Abbreviations
73-
"API",
74-
["API['’]?s", "APIs"],
75-
"Ajax",
76-
"CLI",
77-
"CSS",
78-
"CORS",
79-
["^E2E", "E2E"],
80-
"gif",
81-
["^HTML", "HTML"],
82-
["^URL(s?)", "URL$1"],
83-
["^HTTP", "HTTP"],
84-
["^HTTPS", "HTTPS"],
85-
"SSO",
86-
["^XHR(s?)", "XHR$1"],
87-
["^XHR['’]?s", "XHRs"],
88-
"Xvfb",
89-
"YAML",
90-
91-
// Words and phrases
92-
["\\(s\\)he", "they"],
93-
["he or she", "they"],
94-
["he/she", "they"],
95-
["crazy", "complex"],
96-
["crazier", "more complex"],
97-
["craziest", "most complex"],
98-
["dumb", "unintended"],
99-
["insane", "outrageous"],
100-
101-
// Prefer American spelling
102-
["behaviour", "behavior"],
103-
["cancelled", "canceled"],
104-
["cancelling", "canceling"],
105-
["centre", "center"],
106-
["colour", "color"],
107-
["customise", "customize"],
108-
["customisation", "customization"],
109-
["favourite", "favorite"],
110-
["labelled", "labeled"],
111-
["licence", "license"],
112-
["organise", "organize"],
113-
114-
// Common misspellings
115-
["gaurantee", "guarantee"],
116-
117-
// Words we would like to not use altogether
118-
["simply", ""],
119-
120-
// Single word
121-
["change[- ]log(s?)", "changelog$1"],
122-
["code[- ]base(es?)", "codebase$1"],
123-
["e[- ]mail(s?)", "email$1"],
124-
["end[- ]point(s?)", "endpoint$1"],
125-
["file[- ]name(s?)", "filename$1"],
126-
["can[- ]not", "cannot$1"],
127-
128-
// Multiple words
129-
["back-?end(s?)", "back end$1"],
130-
["front-?end(s?)", "front end$1"],
131-
["full-?stack(s?)", "full stack$1"],
132-
["open-?source(ed?)", "open source$1"],
133-
["web-?page(s?)", "web page$1"],
134-
135-
// Hyphenated
136-
["end ?to ?end", "end-to-end"],
137-
["retryability", "retry-ability"],
138-
["retriability", "retry-ability"],
139-
140-
["some", ""],
141-
["filetype", "file type"],
142-
["stylesheet", "style sheet"],
143-
["like this", ""],
144-
["probably", ""],
145-
["known as", ""],
146-
["really", ""],
147-
["just", ""],
148-
["simple", ""],
149-
["obvious", ""],
150-
["straightforward", ""],
151-
["very", ""],
152-
["a little", ""],
153-
["note that", ""],
154-
["good to note", ""],
155-
["good to remember", ""],
156-
["basically", ""],
157-
["actually", ""],
158-
["pretty", ""],
159-
["easy", ""],
160-
["interesting", ""],
161-
["way to", ""],
162-
["In order to", "To"],
163-
["in order to", "to"],
164-
["might", ""],
165-
["us", ""],
166-
["I'll", ""],
167-
["I've", ""],
168-
["they'll", ""],
169-
["it is", "it's"],
170-
["It is", "It's"],
171-
]
45+
"rules": {
46+
"en-capitalization": true,
47+
"footnote-order": true,
48+
"no-todo": true,
49+
"no-dead-link": {
50+
"ignore": ["bc_data_*"]
51+
},
52+
"no-empty-section": true,
53+
"terminology": true,
54+
"apostrophe": true,
55+
"diacritics": true,
56+
"@textlint-rule/no-invalid-control-character": true,
57+
"@textlint-rule/no-unmatched-pair": true,
58+
"abbr-within-parentheses": true,
59+
"alex": {
60+
"allow": ["period", "european", "failure", "fore", "attack", "execution", "executed", "remain", "execute"]
61+
},
62+
"@textlint-rule/preset-google": true,
63+
"write-good": {
64+
"passive": false,
65+
"eprime": false
66+
},
67+
"common-misspellings": true,
68+
"terminology": {
69+
"defaultTerms": false,
70+
"terms": [
71+
// Abbreviations
72+
"API",
73+
["API['’]?s", "APIs"],
74+
"Ajax",
75+
"CLI",
76+
"CSS",
77+
"CORS",
78+
["^E2E", "E2E"],
79+
"gif",
80+
["^HTML", "HTML"],
81+
["^URL(s?)", "URL$1"],
82+
["^HTTP", "HTTP"],
83+
["^HTTPS", "HTTPS"],
84+
"SSO",
85+
["^XHR(s?)", "XHR$1"],
86+
["^XHR['’]?s", "XHRs"],
87+
"Xvfb",
88+
"YAML",
89+
90+
// Words and phrases
91+
["\\(s\\)he", "they"],
92+
["he or she", "they"],
93+
["he/she", "they"],
94+
["crazy", "complex"],
95+
["crazier", "more complex"],
96+
["craziest", "most complex"],
97+
["dumb", "unintended"],
98+
["insane", "outrageous"],
99+
100+
// Prefer American spelling
101+
["behaviour", "behavior"],
102+
["cancelled", "canceled"],
103+
["cancelling", "canceling"],
104+
["centre", "center"],
105+
["colour", "color"],
106+
["customise", "customize"],
107+
["customisation", "customization"],
108+
["favourite", "favorite"],
109+
["labelled", "labeled"],
110+
["licence", "license"],
111+
["organise", "organize"],
112+
113+
// Common misspellings
114+
["gaurantee", "guarantee"],
115+
116+
// Words we would like to not use altogether
117+
["simply", ""],
118+
119+
// Single word
120+
["change[- ]log(s?)", "changelog$1"],
121+
["code[- ]base(es?)", "codebase$1"],
122+
["e[- ]mail(s?)", "email$1"],
123+
["end[- ]point(s?)", "endpoint$1"],
124+
["file[- ]name(s?)", "filename$1"],
125+
["can[- ]not", "cannot$1"],
126+
127+
// Multiple words
128+
["back-?end(s?)", "back end$1"],
129+
["front-?end(s?)", "front end$1"],
130+
["full-?stack(s?)", "full stack$1"],
131+
["open-?source(ed?)", "open source$1"],
132+
["web-?page(s?)", "web page$1"],
133+
134+
// Hyphenated
135+
["end ?to ?end", "end-to-end"],
136+
["retryability", "retry-ability"],
137+
["retriability", "retry-ability"],
138+
139+
["some", ""],
140+
["filetype", "file type"],
141+
["stylesheet", "style sheet"],
142+
["like this", ""],
143+
["probably", ""],
144+
["known as", ""],
145+
["really", ""],
146+
["just", ""],
147+
["simple", ""],
148+
["obvious", ""],
149+
["straightforward", ""],
150+
["very", ""],
151+
["a little", ""],
152+
["note that", ""],
153+
["good to note", ""],
154+
["good to remember", ""],
155+
["basically", ""],
156+
["actually", ""],
157+
["pretty", ""],
158+
["easy", ""],
159+
["interesting", ""],
160+
["way to", ""],
161+
["In order to", "To"],
162+
["in order to", "to"],
163+
["might", ""],
164+
["us", ""],
165+
["I'll", ""],
166+
["I've", ""],
167+
["they'll", ""],
168+
["it is", "it's"],
169+
["It is", "It's"]
170+
]
171+
}
172172
}
173-
}
174173
}
175174
```
176175

0 commit comments

Comments
 (0)