@anolilab/textlint-config 8.0.16 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +3 -1
- package/package.json +17 -30
- package/dist/postinstall.d.mts +0 -2
- package/dist/postinstall.d.ts +0 -2
- package/dist/postinstall.js +0 -150
- package/dist/postinstall.js.map +0 -1
- package/dist/postinstall.mjs +0 -148
- package/dist/postinstall.mjs.map +0 -1
- package/skip.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## @anolilab/textlint-config [9.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/textlint-config@9.0.0...@anolilab/textlint-config@9.0.1) (2025-05-31)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **deps:** update dependency textlint to ^13.3.3 ([#892](https://github.com/anolilab/javascript-style-guide/issues/892)) ([5b4bb0a](https://github.com/anolilab/javascript-style-guide/commit/5b4bb0a2184faa02a7949900fd341933b8a5aa71))
|
|
6
|
+
* **deps:** update minor updates (minor) ([#896](https://github.com/anolilab/javascript-style-guide/issues/896)) ([d5132c8](https://github.com/anolilab/javascript-style-guide/commit/d5132c8e59df185331772917e8216c78a97e47be))
|
|
7
|
+
|
|
8
|
+
### Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* add new linting scripts and update dependencies ([655a866](https://github.com/anolilab/javascript-style-guide/commit/655a86641903f157e4d8a4dc69d0f44448fa7cc9))
|
|
11
|
+
|
|
12
|
+
## @anolilab/textlint-config [9.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/textlint-config@8.0.16...@anolilab/textlint-config@9.0.0) (2025-05-26)
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **textlint-config:** changed post-install script to a bin command call
|
|
17
|
+
Signed-off-by: prisis <d.bannert@anolilab.de>
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **textlint-config:** removed post-install script, updated dependencies, allowed node 23 ([6e5c48f](https://github.com/anolilab/javascript-style-guide/commit/6e5c48f3cb4775b2622fea0ee6f609c009200f3a))
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **textlint-config:** removed @anolilab/package-json-utils, using cwd of the command call ([fccfef0](https://github.com/anolilab/javascript-style-guide/commit/fccfef0cf8d40d53159f997436e07931ba5f14bf))
|
|
26
|
+
* **textlint-config:** removed check for ci ([f5a8ea5](https://github.com/anolilab/javascript-style-guide/commit/f5a8ea5201a06f4506c13238483028f0f6267c15))
|
|
27
|
+
* **textlint-config:** updated textlint rule dependencies ([7c9ff23](https://github.com/anolilab/javascript-style-guide/commit/7c9ff2319bd633f4df2fc042a43be0dd38025553))
|
|
28
|
+
* **textlint-config:** updated textlint-rule-apostrophe to v3, @textlint/ast-node-types and @textlint/types to v14.4.2 and all dev deps ([a536b62](https://github.com/anolilab/javascript-style-guide/commit/a536b62d6f5016a0b5956d3031d3ed66ce72c721))
|
|
29
|
+
|
|
30
|
+
### Miscellaneous Chores
|
|
31
|
+
|
|
32
|
+
* remove deprecated ESLint and Prettier configurations, update project structure and dependencies ([7b269ed](https://github.com/anolilab/javascript-style-guide/commit/7b269eda93e7dbede5fbdb536dec518dab2bc54b))
|
|
33
|
+
* update node engine compatibility across multiple packages ([8755783](https://github.com/anolilab/javascript-style-guide/commit/8755783d4be3199bd602ede7d83628f83be3f358))
|
|
34
|
+
* update textlint-config dependencies to latest versions ([f94e05c](https://github.com/anolilab/javascript-style-guide/commit/f94e05c221edc0e57ef71b1d0b4e9d2cc66c082a))
|
|
35
|
+
|
|
1
36
|
## @anolilab/textlint-config [8.0.16](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/textlint-config@8.0.15...@anolilab/textlint-config@8.0.16) (2023-12-22)
|
|
2
37
|
|
|
3
38
|
|
package/README.md
CHANGED
|
@@ -35,7 +35,9 @@ pnpm add -D @anolilab/textlint-config textlint
|
|
|
35
35
|
|
|
36
36
|
## Usage
|
|
37
37
|
|
|
38
|
-
If you don’t have a `.textlintrc`, we
|
|
38
|
+
If you don’t have a `.textlintrc` or the other supported file names and `.textlintignore`, we can create the file for you after installing `@anolilab/textlint-config`, call `pnpm textlint-config:install`.
|
|
39
|
+
|
|
40
|
+
> Note: If the script detects an existing `.textlintrc` or `.textlintignore` file, it will not overwrite it.
|
|
39
41
|
|
|
40
42
|
If you already have a `.textlintrc`, then you can extend the `.textlintrc`, with `@anolilab/textlint-config`.
|
|
41
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/textlint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Anolilab Coding Standard for text linting.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -48,57 +48,44 @@
|
|
|
48
48
|
"name": "Daniel Bannert",
|
|
49
49
|
"email": "d.bannert@anolilab.de"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"type": "module",
|
|
52
|
+
"bin": {
|
|
53
|
+
"textlint-config:install": "./dist/bin.mjs"
|
|
54
|
+
},
|
|
52
55
|
"files": [
|
|
53
56
|
"dist",
|
|
54
|
-
"skip.js",
|
|
55
57
|
"README.md",
|
|
56
58
|
"CHANGELOG.md",
|
|
57
59
|
"LICENSE.md"
|
|
58
60
|
],
|
|
59
|
-
"scripts": {
|
|
60
|
-
"build": "cross-env NODE_ENV=development tsup",
|
|
61
|
-
"build:prod": "cross-env NODE_ENV=production tsup",
|
|
62
|
-
"clean": "rimraf node_modules dist",
|
|
63
|
-
"postinstall": "node ./skip.js || node ./dist/postinstall.js"
|
|
64
|
-
},
|
|
65
61
|
"dependencies": {
|
|
66
|
-
"@
|
|
67
|
-
"@textlint-rule/textlint-rule-no-
|
|
68
|
-
"@textlint-rule/textlint-rule-no-unmatched-pair": "^2.0.2",
|
|
62
|
+
"@textlint-rule/textlint-rule-no-invalid-control-character": "^3.0.0",
|
|
63
|
+
"@textlint-rule/textlint-rule-no-unmatched-pair": "^2.0.4",
|
|
69
64
|
"@textlint-rule/textlint-rule-preset-google": "^0.1.2",
|
|
70
|
-
"@textlint/ast-node-types": "^
|
|
71
|
-
"@textlint/types": "^
|
|
65
|
+
"@textlint/ast-node-types": "^14.7.2",
|
|
66
|
+
"@textlint/types": "^14.7.2",
|
|
72
67
|
"textlint-filter-rule-comments": "^1.2.2",
|
|
73
68
|
"textlint-rule-abbr-within-parentheses": "^1.0.2",
|
|
74
|
-
"textlint-rule-alex": "^
|
|
75
|
-
"textlint-rule-apostrophe": "^
|
|
69
|
+
"textlint-rule-alex": "^5.0.0",
|
|
70
|
+
"textlint-rule-apostrophe": "^3.0.0",
|
|
76
71
|
"textlint-rule-common-misspellings": "^1.0.1",
|
|
77
|
-
"textlint-rule-date-weekday-mismatch": "^1.0
|
|
78
|
-
"textlint-rule-diacritics": "^1.
|
|
72
|
+
"textlint-rule-date-weekday-mismatch": "^1.1.0",
|
|
73
|
+
"textlint-rule-diacritics": "^2.1.4",
|
|
79
74
|
"textlint-rule-en-capitalization": "^2.0.3",
|
|
80
75
|
"textlint-rule-footnote-order": "^1.0.3",
|
|
81
76
|
"textlint-rule-helper": "^2.3.1",
|
|
82
|
-
"textlint-rule-no-dead-link": "^5.
|
|
77
|
+
"textlint-rule-no-dead-link": "^5.2.0",
|
|
83
78
|
"textlint-rule-no-empty-section": "^1.1.0",
|
|
84
79
|
"textlint-rule-no-todo": "^2.0.1",
|
|
85
|
-
"textlint-rule-terminology": "^
|
|
80
|
+
"textlint-rule-terminology": "^5.2.12",
|
|
86
81
|
"textlint-rule-write-good": "^2.0.0",
|
|
87
82
|
"write-good": "^1.0.8"
|
|
88
83
|
},
|
|
89
|
-
"devDependencies": {
|
|
90
|
-
"@anolilab/semantic-release-preset": "8.0.3",
|
|
91
|
-
"rimraf": "^5.0.5",
|
|
92
|
-
"semantic-release": "^22.0.12",
|
|
93
|
-
"textlint": "^13.4.1",
|
|
94
|
-
"tsup": "^8.0.1",
|
|
95
|
-
"vitest": "^1.1.0"
|
|
96
|
-
},
|
|
97
84
|
"peerDependencies": {
|
|
98
|
-
"textlint": "^13.3.
|
|
85
|
+
"textlint": "^13.3.3"
|
|
99
86
|
},
|
|
100
87
|
"engines": {
|
|
101
|
-
"node": ">=18.* <=
|
|
88
|
+
"node": ">=20.18.* <=24.*"
|
|
102
89
|
},
|
|
103
90
|
"publishConfig": {
|
|
104
91
|
"access": "public",
|
package/dist/postinstall.d.mts
DELETED
package/dist/postinstall.d.ts
DELETED
package/dist/postinstall.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs');
|
|
4
|
-
var path = require('path');
|
|
5
|
-
var process = require('process');
|
|
6
|
-
var util = require('util');
|
|
7
|
-
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
8
|
-
|
|
9
|
-
process.env.CI!==void 0&&process.exit(0);var a=util.promisify(fs.writeFile);console.log("Configuring @anolilab/textlint-config",packageJsonUtils.projectPath,`
|
|
10
|
-
`);var u=async()=>{let e=path.join(packageJsonUtils.projectPath,".textlintrc"),t=`{
|
|
11
|
-
"@textlint/markdown": {
|
|
12
|
-
"extensions": [".md", ".mdx"]
|
|
13
|
-
},
|
|
14
|
-
"filters": {
|
|
15
|
-
"comments": true
|
|
16
|
-
},
|
|
17
|
-
"rules": {
|
|
18
|
-
"en-capitalization": true,
|
|
19
|
-
"footnote-order": true,
|
|
20
|
-
"no-todo": true,
|
|
21
|
-
"no-dead-link": {
|
|
22
|
-
"ignore": ["bc_data_*"]
|
|
23
|
-
},
|
|
24
|
-
"no-empty-section": true,
|
|
25
|
-
"terminology": true,
|
|
26
|
-
"apostrophe": true,
|
|
27
|
-
"diacritics": true,
|
|
28
|
-
"@textlint-rule/no-invalid-control-character": true,
|
|
29
|
-
"@textlint-rule/no-unmatched-pair": true,
|
|
30
|
-
"abbr-within-parentheses": true,
|
|
31
|
-
"alex": {
|
|
32
|
-
"allow": ["period", "european", "failure", "fore", "attack", "execution", "executed", "remain", "execute"]
|
|
33
|
-
},
|
|
34
|
-
"@textlint-rule/preset-google": true,
|
|
35
|
-
"write-good": {
|
|
36
|
-
"passive": false,
|
|
37
|
-
"eprime": false
|
|
38
|
-
},
|
|
39
|
-
"common-misspellings": true,
|
|
40
|
-
"terminology": {
|
|
41
|
-
"defaultTerms": false,
|
|
42
|
-
"terms": [
|
|
43
|
-
// Abbreviations
|
|
44
|
-
"API",
|
|
45
|
-
["API['\u2019]?s", "APIs"],
|
|
46
|
-
"Ajax",
|
|
47
|
-
"CLI",
|
|
48
|
-
"CSS",
|
|
49
|
-
"CORS",
|
|
50
|
-
["^E2E", "E2E"],
|
|
51
|
-
"gif",
|
|
52
|
-
["^HTML", "HTML"],
|
|
53
|
-
["^URL(s?)", "URL$1"],
|
|
54
|
-
["^HTTP", "HTTP"],
|
|
55
|
-
["^HTTPS", "HTTPS"],
|
|
56
|
-
"SSO",
|
|
57
|
-
["^XHR(s?)", "XHR$1"],
|
|
58
|
-
["^XHR['\u2019]?s", "XHRs"],
|
|
59
|
-
"Xvfb",
|
|
60
|
-
"YAML",
|
|
61
|
-
|
|
62
|
-
// Words and phrases
|
|
63
|
-
["\\(s\\)he", "they"],
|
|
64
|
-
["he or she", "they"],
|
|
65
|
-
["he/she", "they"],
|
|
66
|
-
["crazy", "complex"],
|
|
67
|
-
["crazier", "more complex"],
|
|
68
|
-
["craziest", "most complex"],
|
|
69
|
-
["dumb", "unintended"],
|
|
70
|
-
["insane", "outrageous"],
|
|
71
|
-
|
|
72
|
-
// Prefer American spelling
|
|
73
|
-
["behaviour", "behavior"],
|
|
74
|
-
["cancelled", "canceled"],
|
|
75
|
-
["cancelling", "canceling"],
|
|
76
|
-
["centre", "center"],
|
|
77
|
-
["colour", "color"],
|
|
78
|
-
["customise", "customize"],
|
|
79
|
-
["customisation", "customization"],
|
|
80
|
-
["favourite", "favorite"],
|
|
81
|
-
["labelled", "labeled"],
|
|
82
|
-
["licence", "license"],
|
|
83
|
-
["organise", "organize"],
|
|
84
|
-
|
|
85
|
-
// Common misspellings
|
|
86
|
-
["gaurantee", "guarantee"],
|
|
87
|
-
|
|
88
|
-
// Words we would like to not use altogether
|
|
89
|
-
["simply", ""],
|
|
90
|
-
|
|
91
|
-
// Single word
|
|
92
|
-
["change[- ]log(s?)", "changelog$1"],
|
|
93
|
-
["code[- ]base(es?)", "codebase$1"],
|
|
94
|
-
["e[- ]mail(s?)", "email$1"],
|
|
95
|
-
["end[- ]point(s?)", "endpoint$1"],
|
|
96
|
-
["file[- ]name(s?)", "filename$1"],
|
|
97
|
-
["can[- ]not", "cannot$1"],
|
|
98
|
-
|
|
99
|
-
// Multiple words
|
|
100
|
-
["back-?end(s?)", "back end$1"],
|
|
101
|
-
["front-?end(s?)", "front end$1"],
|
|
102
|
-
["full-?stack(s?)", "full stack$1"],
|
|
103
|
-
["open-?source(ed?)", "open source$1"],
|
|
104
|
-
["web-?page(s?)", "web page$1"],
|
|
105
|
-
|
|
106
|
-
// Hyphenated
|
|
107
|
-
["end ?to ?end", "end-to-end"],
|
|
108
|
-
["retryability", "retry-ability"],
|
|
109
|
-
["retriability", "retry-ability"],
|
|
110
|
-
|
|
111
|
-
["some", ""],
|
|
112
|
-
["filetype", "file type"],
|
|
113
|
-
["stylesheet", "style sheet"],
|
|
114
|
-
["like this", ""],
|
|
115
|
-
["probably", ""],
|
|
116
|
-
["known as", ""],
|
|
117
|
-
["really", ""],
|
|
118
|
-
["just", ""],
|
|
119
|
-
["simple", ""],
|
|
120
|
-
["obvious", ""],
|
|
121
|
-
["straightforward", ""],
|
|
122
|
-
["very", ""],
|
|
123
|
-
["a little", ""],
|
|
124
|
-
["note that", ""],
|
|
125
|
-
["good to note", ""],
|
|
126
|
-
["good to remember", ""],
|
|
127
|
-
["basically", ""],
|
|
128
|
-
["actually", ""],
|
|
129
|
-
["pretty", ""],
|
|
130
|
-
["easy", ""],
|
|
131
|
-
["interesting", ""],
|
|
132
|
-
["way to", ""],
|
|
133
|
-
["In order to", "To"],
|
|
134
|
-
["in order to", "to"],
|
|
135
|
-
["might", ""],
|
|
136
|
-
["us", ""],
|
|
137
|
-
["I'll", ""],
|
|
138
|
-
["I've", ""],
|
|
139
|
-
["they'll", ""],
|
|
140
|
-
["it is", "it's"],
|
|
141
|
-
["It is", "It's"]
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
`;if(fs.existsSync(e)){console.warn(`\u26A0\uFE0F .textlintrc already exists;
|
|
147
|
-
Make sure that it includes the following for @anolilab/textlint-config'
|
|
148
|
-
to work as it should: ${t}.`);return}await a(e,t,"utf-8");},d=async()=>{let e=path.join(packageJsonUtils.projectPath,".textlintignore"),t="";if(fs.existsSync(e)){console.warn("\u26A0\uFE0F .textlintignore already exists;");return}await a(e,t,"utf-8");};(async()=>{try{await u(),await d(),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(e){console.log("\u{1F62C} something went wrong:"),console.error(e),process.exit(1);}})();
|
|
149
|
-
//# sourceMappingURL=out.js.map
|
|
150
|
-
//# sourceMappingURL=postinstall.js.map
|
package/dist/postinstall.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","env","exit","promisify","projectPath","writeFileAsync","writeTextLintRc","filePath","content","writeTextLintIgnore","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAE1B,OAAS,eAAAC,MAAmB,+BAExBH,EAAI,KAAU,QACdC,EAAK,CAAC,EAGV,IAAMG,EAAiBF,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,wCAAyCK,EAAa;AAAA,CAAI,EAKtE,IAAME,EAAkB,SAAY,CAChC,IAAMC,EAAWP,EAAKI,EAAa,aAAa,EAC1CI,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2IhB,GAAIV,EAAWS,CAAQ,EAAG,CACtB,QAAQ,KAAK;AAAA;AAAA,wBAEGC,CAAO,GAAG,EAE1B,MACJ,CAEA,MAAMH,EAAeE,EAAUC,EAAS,OAAO,CACnD,EAKMC,EAAsB,SAAY,CACpC,IAAMF,EAAWP,EAAKI,EAAa,iBAAiB,EAC9CI,EAAU,GAGhB,GAAIV,EAAWS,CAAQ,EAAG,CACtB,QAAQ,KAAK,+CAAqC,EAElD,MACJ,CAEA,MAAMF,EAAeE,EAAUC,EAAS,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CACA,MAAMF,EAAgB,EACtB,MAAMG,EAAoB,EAE1B,QAAQ,IAAI,4CAAqC,EAEjDP,EAAK,CAAC,CACV,OAASQ,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBR,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\n\nif (env[\"CI\"] !== undefined) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/textlint-config\", projectPath, \"\\n\");\n\n/**\n * Writes .textlintrc if it doesn't exist. Warns if it exists.\n */\nconst writeTextLintRc = async () => {\n const filePath = join(projectPath, \".textlintrc\");\n const content = `{\n \"@textlint/markdown\": {\n \"extensions\": [\".md\", \".mdx\"]\n },\n \"filters\": {\n \"comments\": true\n },\n \"rules\": {\n \"en-capitalization\": true,\n \"footnote-order\": true,\n \"no-todo\": true,\n \"no-dead-link\": {\n \"ignore\": [\"bc_data_*\"]\n },\n \"no-empty-section\": true,\n \"terminology\": true,\n \"apostrophe\": true,\n \"diacritics\": true,\n \"@textlint-rule/no-invalid-control-character\": true,\n \"@textlint-rule/no-unmatched-pair\": true,\n \"abbr-within-parentheses\": true,\n \"alex\": {\n \"allow\": [\"period\", \"european\", \"failure\", \"fore\", \"attack\", \"execution\", \"executed\", \"remain\", \"execute\"]\n },\n \"@textlint-rule/preset-google\": true,\n \"write-good\": {\n \"passive\": false,\n \"eprime\": false\n },\n \"common-misspellings\": true,\n \"terminology\": {\n \"defaultTerms\": false,\n \"terms\": [\n // Abbreviations\n \"API\",\n [\"API['’]?s\", \"APIs\"],\n \"Ajax\",\n \"CLI\",\n \"CSS\",\n \"CORS\",\n [\"^E2E\", \"E2E\"],\n \"gif\",\n [\"^HTML\", \"HTML\"],\n [\"^URL(s?)\", \"URL$1\"],\n [\"^HTTP\", \"HTTP\"],\n [\"^HTTPS\", \"HTTPS\"],\n \"SSO\",\n [\"^XHR(s?)\", \"XHR$1\"],\n [\"^XHR['’]?s\", \"XHRs\"],\n \"Xvfb\",\n \"YAML\",\n\n // Words and phrases\n [\"\\\\(s\\\\)he\", \"they\"],\n [\"he or she\", \"they\"],\n [\"he/she\", \"they\"],\n [\"crazy\", \"complex\"],\n [\"crazier\", \"more complex\"],\n [\"craziest\", \"most complex\"],\n [\"dumb\", \"unintended\"],\n [\"insane\", \"outrageous\"],\n\n // Prefer American spelling\n [\"behaviour\", \"behavior\"],\n [\"cancelled\", \"canceled\"],\n [\"cancelling\", \"canceling\"],\n [\"centre\", \"center\"],\n [\"colour\", \"color\"],\n [\"customise\", \"customize\"],\n [\"customisation\", \"customization\"],\n [\"favourite\", \"favorite\"],\n [\"labelled\", \"labeled\"],\n [\"licence\", \"license\"],\n [\"organise\", \"organize\"],\n\n // Common misspellings\n [\"gaurantee\", \"guarantee\"],\n\n // Words we would like to not use altogether\n [\"simply\", \"\"],\n\n // Single word\n [\"change[- ]log(s?)\", \"changelog$1\"],\n [\"code[- ]base(es?)\", \"codebase$1\"],\n [\"e[- ]mail(s?)\", \"email$1\"],\n [\"end[- ]point(s?)\", \"endpoint$1\"],\n [\"file[- ]name(s?)\", \"filename$1\"],\n [\"can[- ]not\", \"cannot$1\"],\n\n // Multiple words\n [\"back-?end(s?)\", \"back end$1\"],\n [\"front-?end(s?)\", \"front end$1\"],\n [\"full-?stack(s?)\", \"full stack$1\"],\n [\"open-?source(ed?)\", \"open source$1\"],\n [\"web-?page(s?)\", \"web page$1\"],\n\n // Hyphenated\n [\"end ?to ?end\", \"end-to-end\"],\n [\"retryability\", \"retry-ability\"],\n [\"retriability\", \"retry-ability\"],\n\n [\"some\", \"\"],\n [\"filetype\", \"file type\"],\n [\"stylesheet\", \"style sheet\"],\n [\"like this\", \"\"],\n [\"probably\", \"\"],\n [\"known as\", \"\"],\n [\"really\", \"\"],\n [\"just\", \"\"],\n [\"simple\", \"\"],\n [\"obvious\", \"\"],\n [\"straightforward\", \"\"],\n [\"very\", \"\"],\n [\"a little\", \"\"],\n [\"note that\", \"\"],\n [\"good to note\", \"\"],\n [\"good to remember\", \"\"],\n [\"basically\", \"\"],\n [\"actually\", \"\"],\n [\"pretty\", \"\"],\n [\"easy\", \"\"],\n [\"interesting\", \"\"],\n [\"way to\", \"\"],\n [\"In order to\", \"To\"],\n [\"in order to\", \"to\"],\n [\"might\", \"\"],\n [\"us\", \"\"],\n [\"I'll\", \"\"],\n [\"I've\", \"\"],\n [\"they'll\", \"\"],\n [\"it is\", \"it's\"],\n [\"It is\", \"It's\"]\n ]\n }\n }\n}\n`;\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(`⚠️ .textlintrc already exists;\nMake sure that it includes the following for @anolilab/textlint-config'\nto work as it should: ${content}.`);\n\n return;\n }\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n/**\n * Writes .textlintignore if it doesn't exist. Warns if it exists.\n */\nconst writeTextLintIgnore = async () => {\n const filePath = join(projectPath, \".textlintignore\");\n const content = \"\";\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .textlintignore already exists;\");\n\n return;\n }\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeTextLintRc();\n await writeTextLintIgnore();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
|
package/dist/postinstall.mjs
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { writeFile, existsSync } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
import { env, exit } from 'process';
|
|
4
|
-
import { promisify } from 'util';
|
|
5
|
-
import { projectPath } from '@anolilab/package-json-utils';
|
|
6
|
-
|
|
7
|
-
env.CI!==void 0&&exit(0);var a=promisify(writeFile);console.log("Configuring @anolilab/textlint-config",projectPath,`
|
|
8
|
-
`);var u=async()=>{let e=join(projectPath,".textlintrc"),t=`{
|
|
9
|
-
"@textlint/markdown": {
|
|
10
|
-
"extensions": [".md", ".mdx"]
|
|
11
|
-
},
|
|
12
|
-
"filters": {
|
|
13
|
-
"comments": true
|
|
14
|
-
},
|
|
15
|
-
"rules": {
|
|
16
|
-
"en-capitalization": true,
|
|
17
|
-
"footnote-order": true,
|
|
18
|
-
"no-todo": true,
|
|
19
|
-
"no-dead-link": {
|
|
20
|
-
"ignore": ["bc_data_*"]
|
|
21
|
-
},
|
|
22
|
-
"no-empty-section": true,
|
|
23
|
-
"terminology": true,
|
|
24
|
-
"apostrophe": true,
|
|
25
|
-
"diacritics": true,
|
|
26
|
-
"@textlint-rule/no-invalid-control-character": true,
|
|
27
|
-
"@textlint-rule/no-unmatched-pair": true,
|
|
28
|
-
"abbr-within-parentheses": true,
|
|
29
|
-
"alex": {
|
|
30
|
-
"allow": ["period", "european", "failure", "fore", "attack", "execution", "executed", "remain", "execute"]
|
|
31
|
-
},
|
|
32
|
-
"@textlint-rule/preset-google": true,
|
|
33
|
-
"write-good": {
|
|
34
|
-
"passive": false,
|
|
35
|
-
"eprime": false
|
|
36
|
-
},
|
|
37
|
-
"common-misspellings": true,
|
|
38
|
-
"terminology": {
|
|
39
|
-
"defaultTerms": false,
|
|
40
|
-
"terms": [
|
|
41
|
-
// Abbreviations
|
|
42
|
-
"API",
|
|
43
|
-
["API['\u2019]?s", "APIs"],
|
|
44
|
-
"Ajax",
|
|
45
|
-
"CLI",
|
|
46
|
-
"CSS",
|
|
47
|
-
"CORS",
|
|
48
|
-
["^E2E", "E2E"],
|
|
49
|
-
"gif",
|
|
50
|
-
["^HTML", "HTML"],
|
|
51
|
-
["^URL(s?)", "URL$1"],
|
|
52
|
-
["^HTTP", "HTTP"],
|
|
53
|
-
["^HTTPS", "HTTPS"],
|
|
54
|
-
"SSO",
|
|
55
|
-
["^XHR(s?)", "XHR$1"],
|
|
56
|
-
["^XHR['\u2019]?s", "XHRs"],
|
|
57
|
-
"Xvfb",
|
|
58
|
-
"YAML",
|
|
59
|
-
|
|
60
|
-
// Words and phrases
|
|
61
|
-
["\\(s\\)he", "they"],
|
|
62
|
-
["he or she", "they"],
|
|
63
|
-
["he/she", "they"],
|
|
64
|
-
["crazy", "complex"],
|
|
65
|
-
["crazier", "more complex"],
|
|
66
|
-
["craziest", "most complex"],
|
|
67
|
-
["dumb", "unintended"],
|
|
68
|
-
["insane", "outrageous"],
|
|
69
|
-
|
|
70
|
-
// Prefer American spelling
|
|
71
|
-
["behaviour", "behavior"],
|
|
72
|
-
["cancelled", "canceled"],
|
|
73
|
-
["cancelling", "canceling"],
|
|
74
|
-
["centre", "center"],
|
|
75
|
-
["colour", "color"],
|
|
76
|
-
["customise", "customize"],
|
|
77
|
-
["customisation", "customization"],
|
|
78
|
-
["favourite", "favorite"],
|
|
79
|
-
["labelled", "labeled"],
|
|
80
|
-
["licence", "license"],
|
|
81
|
-
["organise", "organize"],
|
|
82
|
-
|
|
83
|
-
// Common misspellings
|
|
84
|
-
["gaurantee", "guarantee"],
|
|
85
|
-
|
|
86
|
-
// Words we would like to not use altogether
|
|
87
|
-
["simply", ""],
|
|
88
|
-
|
|
89
|
-
// Single word
|
|
90
|
-
["change[- ]log(s?)", "changelog$1"],
|
|
91
|
-
["code[- ]base(es?)", "codebase$1"],
|
|
92
|
-
["e[- ]mail(s?)", "email$1"],
|
|
93
|
-
["end[- ]point(s?)", "endpoint$1"],
|
|
94
|
-
["file[- ]name(s?)", "filename$1"],
|
|
95
|
-
["can[- ]not", "cannot$1"],
|
|
96
|
-
|
|
97
|
-
// Multiple words
|
|
98
|
-
["back-?end(s?)", "back end$1"],
|
|
99
|
-
["front-?end(s?)", "front end$1"],
|
|
100
|
-
["full-?stack(s?)", "full stack$1"],
|
|
101
|
-
["open-?source(ed?)", "open source$1"],
|
|
102
|
-
["web-?page(s?)", "web page$1"],
|
|
103
|
-
|
|
104
|
-
// Hyphenated
|
|
105
|
-
["end ?to ?end", "end-to-end"],
|
|
106
|
-
["retryability", "retry-ability"],
|
|
107
|
-
["retriability", "retry-ability"],
|
|
108
|
-
|
|
109
|
-
["some", ""],
|
|
110
|
-
["filetype", "file type"],
|
|
111
|
-
["stylesheet", "style sheet"],
|
|
112
|
-
["like this", ""],
|
|
113
|
-
["probably", ""],
|
|
114
|
-
["known as", ""],
|
|
115
|
-
["really", ""],
|
|
116
|
-
["just", ""],
|
|
117
|
-
["simple", ""],
|
|
118
|
-
["obvious", ""],
|
|
119
|
-
["straightforward", ""],
|
|
120
|
-
["very", ""],
|
|
121
|
-
["a little", ""],
|
|
122
|
-
["note that", ""],
|
|
123
|
-
["good to note", ""],
|
|
124
|
-
["good to remember", ""],
|
|
125
|
-
["basically", ""],
|
|
126
|
-
["actually", ""],
|
|
127
|
-
["pretty", ""],
|
|
128
|
-
["easy", ""],
|
|
129
|
-
["interesting", ""],
|
|
130
|
-
["way to", ""],
|
|
131
|
-
["In order to", "To"],
|
|
132
|
-
["in order to", "to"],
|
|
133
|
-
["might", ""],
|
|
134
|
-
["us", ""],
|
|
135
|
-
["I'll", ""],
|
|
136
|
-
["I've", ""],
|
|
137
|
-
["they'll", ""],
|
|
138
|
-
["it is", "it's"],
|
|
139
|
-
["It is", "It's"]
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
`;if(existsSync(e)){console.warn(`\u26A0\uFE0F .textlintrc already exists;
|
|
145
|
-
Make sure that it includes the following for @anolilab/textlint-config'
|
|
146
|
-
to work as it should: ${t}.`);return}await a(e,t,"utf-8");},d=async()=>{let e=join(projectPath,".textlintignore"),t="";if(existsSync(e)){console.warn("\u26A0\uFE0F .textlintignore already exists;");return}await a(e,t,"utf-8");};(async()=>{try{await u(),await d(),console.log("\u{1F60E} Everything went well, have fun!"),exit(0);}catch(e){console.log("\u{1F62C} something went wrong:"),console.error(e),exit(1);}})();
|
|
147
|
-
//# sourceMappingURL=out.js.map
|
|
148
|
-
//# sourceMappingURL=postinstall.mjs.map
|
package/dist/postinstall.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","env","exit","promisify","projectPath","writeFileAsync","writeTextLintRc","filePath","content","writeTextLintIgnore","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAE1B,OAAS,eAAAC,MAAmB,+BAExBH,EAAI,KAAU,QACdC,EAAK,CAAC,EAGV,IAAMG,EAAiBF,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,wCAAyCK,EAAa;AAAA,CAAI,EAKtE,IAAME,EAAkB,SAAY,CAChC,IAAMC,EAAWP,EAAKI,EAAa,aAAa,EAC1CI,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2IhB,GAAIV,EAAWS,CAAQ,EAAG,CACtB,QAAQ,KAAK;AAAA;AAAA,wBAEGC,CAAO,GAAG,EAE1B,MACJ,CAEA,MAAMH,EAAeE,EAAUC,EAAS,OAAO,CACnD,EAKMC,EAAsB,SAAY,CACpC,IAAMF,EAAWP,EAAKI,EAAa,iBAAiB,EAC9CI,EAAU,GAGhB,GAAIV,EAAWS,CAAQ,EAAG,CACtB,QAAQ,KAAK,+CAAqC,EAElD,MACJ,CAEA,MAAMF,EAAeE,EAAUC,EAAS,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CACA,MAAMF,EAAgB,EACtB,MAAMG,EAAoB,EAE1B,QAAQ,IAAI,4CAAqC,EAEjDP,EAAK,CAAC,CACV,OAASQ,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBR,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\n\nif (env[\"CI\"] !== undefined) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/textlint-config\", projectPath, \"\\n\");\n\n/**\n * Writes .textlintrc if it doesn't exist. Warns if it exists.\n */\nconst writeTextLintRc = async () => {\n const filePath = join(projectPath, \".textlintrc\");\n const content = `{\n \"@textlint/markdown\": {\n \"extensions\": [\".md\", \".mdx\"]\n },\n \"filters\": {\n \"comments\": true\n },\n \"rules\": {\n \"en-capitalization\": true,\n \"footnote-order\": true,\n \"no-todo\": true,\n \"no-dead-link\": {\n \"ignore\": [\"bc_data_*\"]\n },\n \"no-empty-section\": true,\n \"terminology\": true,\n \"apostrophe\": true,\n \"diacritics\": true,\n \"@textlint-rule/no-invalid-control-character\": true,\n \"@textlint-rule/no-unmatched-pair\": true,\n \"abbr-within-parentheses\": true,\n \"alex\": {\n \"allow\": [\"period\", \"european\", \"failure\", \"fore\", \"attack\", \"execution\", \"executed\", \"remain\", \"execute\"]\n },\n \"@textlint-rule/preset-google\": true,\n \"write-good\": {\n \"passive\": false,\n \"eprime\": false\n },\n \"common-misspellings\": true,\n \"terminology\": {\n \"defaultTerms\": false,\n \"terms\": [\n // Abbreviations\n \"API\",\n [\"API['’]?s\", \"APIs\"],\n \"Ajax\",\n \"CLI\",\n \"CSS\",\n \"CORS\",\n [\"^E2E\", \"E2E\"],\n \"gif\",\n [\"^HTML\", \"HTML\"],\n [\"^URL(s?)\", \"URL$1\"],\n [\"^HTTP\", \"HTTP\"],\n [\"^HTTPS\", \"HTTPS\"],\n \"SSO\",\n [\"^XHR(s?)\", \"XHR$1\"],\n [\"^XHR['’]?s\", \"XHRs\"],\n \"Xvfb\",\n \"YAML\",\n\n // Words and phrases\n [\"\\\\(s\\\\)he\", \"they\"],\n [\"he or she\", \"they\"],\n [\"he/she\", \"they\"],\n [\"crazy\", \"complex\"],\n [\"crazier\", \"more complex\"],\n [\"craziest\", \"most complex\"],\n [\"dumb\", \"unintended\"],\n [\"insane\", \"outrageous\"],\n\n // Prefer American spelling\n [\"behaviour\", \"behavior\"],\n [\"cancelled\", \"canceled\"],\n [\"cancelling\", \"canceling\"],\n [\"centre\", \"center\"],\n [\"colour\", \"color\"],\n [\"customise\", \"customize\"],\n [\"customisation\", \"customization\"],\n [\"favourite\", \"favorite\"],\n [\"labelled\", \"labeled\"],\n [\"licence\", \"license\"],\n [\"organise\", \"organize\"],\n\n // Common misspellings\n [\"gaurantee\", \"guarantee\"],\n\n // Words we would like to not use altogether\n [\"simply\", \"\"],\n\n // Single word\n [\"change[- ]log(s?)\", \"changelog$1\"],\n [\"code[- ]base(es?)\", \"codebase$1\"],\n [\"e[- ]mail(s?)\", \"email$1\"],\n [\"end[- ]point(s?)\", \"endpoint$1\"],\n [\"file[- ]name(s?)\", \"filename$1\"],\n [\"can[- ]not\", \"cannot$1\"],\n\n // Multiple words\n [\"back-?end(s?)\", \"back end$1\"],\n [\"front-?end(s?)\", \"front end$1\"],\n [\"full-?stack(s?)\", \"full stack$1\"],\n [\"open-?source(ed?)\", \"open source$1\"],\n [\"web-?page(s?)\", \"web page$1\"],\n\n // Hyphenated\n [\"end ?to ?end\", \"end-to-end\"],\n [\"retryability\", \"retry-ability\"],\n [\"retriability\", \"retry-ability\"],\n\n [\"some\", \"\"],\n [\"filetype\", \"file type\"],\n [\"stylesheet\", \"style sheet\"],\n [\"like this\", \"\"],\n [\"probably\", \"\"],\n [\"known as\", \"\"],\n [\"really\", \"\"],\n [\"just\", \"\"],\n [\"simple\", \"\"],\n [\"obvious\", \"\"],\n [\"straightforward\", \"\"],\n [\"very\", \"\"],\n [\"a little\", \"\"],\n [\"note that\", \"\"],\n [\"good to note\", \"\"],\n [\"good to remember\", \"\"],\n [\"basically\", \"\"],\n [\"actually\", \"\"],\n [\"pretty\", \"\"],\n [\"easy\", \"\"],\n [\"interesting\", \"\"],\n [\"way to\", \"\"],\n [\"In order to\", \"To\"],\n [\"in order to\", \"to\"],\n [\"might\", \"\"],\n [\"us\", \"\"],\n [\"I'll\", \"\"],\n [\"I've\", \"\"],\n [\"they'll\", \"\"],\n [\"it is\", \"it's\"],\n [\"It is\", \"It's\"]\n ]\n }\n }\n}\n`;\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(`⚠️ .textlintrc already exists;\nMake sure that it includes the following for @anolilab/textlint-config'\nto work as it should: ${content}.`);\n\n return;\n }\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n/**\n * Writes .textlintignore if it doesn't exist. Warns if it exists.\n */\nconst writeTextLintIgnore = async () => {\n const filePath = join(projectPath, \".textlintignore\");\n const content = \"\";\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .textlintignore already exists;\");\n\n return;\n }\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeTextLintRc();\n await writeTextLintIgnore();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
|