@anolilab/textlint-config 5.0.1 → 5.0.2
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 +7 -0
- package/README.md +2 -2
- package/dist/postinstall.js +4 -3
- package/dist/postinstall.js.map +1 -1
- package/dist/postinstall.mjs +5 -4
- package/dist/postinstall.mjs.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @anolilab/textlint-config [5.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/textlint-config@5.0.1...@anolilab/textlint-config@5.0.2) (2023-06-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use the projectPath from @anolilab/package-json-utils ([1574f21](https://github.com/anolilab/javascript-style-guide/commit/1574f2189e9d9e5db3aad4ad2d53ed2987a3afc4))
|
|
7
|
+
|
|
1
8
|
## @anolilab/textlint-config [5.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/textlint-config@5.0.0...@anolilab/textlint-config@5.0.1) (2023-06-10)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -21,11 +21,11 @@ npm install --dev-save @anolilab/textlint-config textlint
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```sh
|
|
24
|
-
|
|
24
|
+
yarn add -D @anolilab/textlint-config textlint
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
|
|
28
|
+
pnpm add -D @anolilab/textlint-config textlint
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Usage
|
package/dist/postinstall.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
4
5
|
var fs = require('fs');
|
|
5
6
|
var path = require('path');
|
|
6
7
|
var util = require('util');
|
|
7
8
|
|
|
8
|
-
process.env.CI&&process.exit(0);var i=util.promisify(fs.writeFile)
|
|
9
|
-
`);var
|
|
9
|
+
process.env.CI&&process.exit(0);var i=util.promisify(fs.writeFile);console.log("Configuring @anolilab/textlint-config",packageJsonUtils.projectPath,`
|
|
10
|
+
`);var a=()=>{let e=path.join(packageJsonUtils.projectPath,".textlintrc"),t=`{
|
|
10
11
|
"@textlint/markdown": {
|
|
11
12
|
"extensions": [".md", ".mdx"]
|
|
12
13
|
},
|
|
@@ -144,6 +145,6 @@ process.env.CI&&process.exit(0);var i=util.promisify(fs.writeFile),o=path.resolv
|
|
|
144
145
|
}
|
|
145
146
|
`;return fs.existsSync(e)?(console.warn(`\u26A0\uFE0F .textlintrc already exists;
|
|
146
147
|
Make sure that it includes the following for @anolilab/textlint-config'
|
|
147
|
-
to work as it should: ${t}.`),Promise.resolve()):i(e,t,"utf-8")},
|
|
148
|
+
to work as it should: ${t}.`),Promise.resolve()):i(e,t,"utf-8")},c=()=>{let e=path.join(packageJsonUtils.projectPath,".textlintignore"),t="";return fs.existsSync(e)?(console.warn("\u26A0\uFE0F .textlintignore already exists;"),Promise.resolve()):i(e,t,"utf-8")};(async()=>{try{await a(),await c(),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);}})();
|
|
148
149
|
//# sourceMappingURL=out.js.map
|
|
149
150
|
//# sourceMappingURL=postinstall.js.map
|
package/dist/postinstall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","
|
|
1
|
+
{"version":3,"sources":["../src/postinstall.ts"],"names":["projectPath","existsSync","writeFile","join","promisify","writeFileAsync","writeTextLintRc","filePath","content","writeTextLintIgnore","error"],"mappings":";AAEA,OAAS,eAAAA,MAAmB,+BAC5B,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCF,EAAa;AAAA,CAAI,EAKtE,IAAMM,EAAkB,IAAM,CAC1B,IAAMC,EAAWJ,EAAKH,EAAa,aAAa,EAC1CQ,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,EA0IhB,OAAIP,EAAWM,CAAQ,GACnB,QAAQ,KAAK;AAAA;AAAA,wBAEGC,IAAU,EAEnB,QAAQ,QAAQ,GAGpBH,EAAeE,EAAUC,EAAS,OAAO,CACpD,EAKMC,EAAsB,IAAM,CAC9B,IAAMF,EAAWJ,EAAKH,EAAa,iBAAiB,EAC9CQ,EAAU,GAEhB,OAAIP,EAAWM,CAAQ,GACnB,QAAQ,KAAK,+CAAqC,EAE3C,QAAQ,QAAQ,GAGpBF,EAAeE,EAAUC,EAAS,OAAO,CACpD,GAGC,SAAY,CACT,GAAI,CACA,MAAMF,EAAgB,EACtB,MAAMG,EAAoB,EAE1B,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["#!/usr/bin/env node\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line no-undef\n process.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 = () => {\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 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 Promise.resolve();\n }\n\n return writeFileAsync(filePath, content, \"utf-8\");\n};\n\n/**\n * Writes .textlintignore if it doesn't exist. Warns if it exists.\n */\nconst writeTextLintIgnore = () => {\n const filePath = join(projectPath, \".textlintignore\");\n const content = \"\";\n\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .textlintignore already exists;\");\n\n return Promise.resolve();\n }\n\n return 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 // eslint-disable-next-line no-undef\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n})();\n"]}
|
package/dist/postinstall.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { projectPath } from '@anolilab/package-json-utils';
|
|
2
3
|
import { writeFile, existsSync } from 'fs';
|
|
3
|
-
import {
|
|
4
|
+
import { join } from 'path';
|
|
4
5
|
import { promisify } from 'util';
|
|
5
6
|
|
|
6
|
-
process.env.CI&&process.exit(0);var i=promisify(writeFile)
|
|
7
|
-
`);var
|
|
7
|
+
process.env.CI&&process.exit(0);var i=promisify(writeFile);console.log("Configuring @anolilab/textlint-config",projectPath,`
|
|
8
|
+
`);var a=()=>{let e=join(projectPath,".textlintrc"),t=`{
|
|
8
9
|
"@textlint/markdown": {
|
|
9
10
|
"extensions": [".md", ".mdx"]
|
|
10
11
|
},
|
|
@@ -142,6 +143,6 @@ process.env.CI&&process.exit(0);var i=promisify(writeFile),o=resolve(process.cwd
|
|
|
142
143
|
}
|
|
143
144
|
`;return existsSync(e)?(console.warn(`\u26A0\uFE0F .textlintrc already exists;
|
|
144
145
|
Make sure that it includes the following for @anolilab/textlint-config'
|
|
145
|
-
to work as it should: ${t}.`),Promise.resolve()):i(e,t,"utf-8")},
|
|
146
|
+
to work as it should: ${t}.`),Promise.resolve()):i(e,t,"utf-8")},c=()=>{let e=join(projectPath,".textlintignore"),t="";return existsSync(e)?(console.warn("\u26A0\uFE0F .textlintignore already exists;"),Promise.resolve()):i(e,t,"utf-8")};(async()=>{try{await a(),await c(),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);}})();
|
|
146
147
|
//# sourceMappingURL=out.js.map
|
|
147
148
|
//# sourceMappingURL=postinstall.mjs.map
|
package/dist/postinstall.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","
|
|
1
|
+
{"version":3,"sources":["../src/postinstall.ts"],"names":["projectPath","existsSync","writeFile","join","promisify","writeFileAsync","writeTextLintRc","filePath","content","writeTextLintIgnore","error"],"mappings":";AAEA,OAAS,eAAAA,MAAmB,+BAC5B,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCF,EAAa;AAAA,CAAI,EAKtE,IAAMM,EAAkB,IAAM,CAC1B,IAAMC,EAAWJ,EAAKH,EAAa,aAAa,EAC1CQ,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,EA0IhB,OAAIP,EAAWM,CAAQ,GACnB,QAAQ,KAAK;AAAA;AAAA,wBAEGC,IAAU,EAEnB,QAAQ,QAAQ,GAGpBH,EAAeE,EAAUC,EAAS,OAAO,CACpD,EAKMC,EAAsB,IAAM,CAC9B,IAAMF,EAAWJ,EAAKH,EAAa,iBAAiB,EAC9CQ,EAAU,GAEhB,OAAIP,EAAWM,CAAQ,GACnB,QAAQ,KAAK,+CAAqC,EAE3C,QAAQ,QAAQ,GAGpBF,EAAeE,EAAUC,EAAS,OAAO,CACpD,GAGC,SAAY,CACT,GAAI,CACA,MAAMF,EAAgB,EACtB,MAAMG,EAAoB,EAE1B,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["#!/usr/bin/env node\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line no-undef\n process.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 = () => {\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 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 Promise.resolve();\n }\n\n return writeFileAsync(filePath, content, \"utf-8\");\n};\n\n/**\n * Writes .textlintignore if it doesn't exist. Warns if it exists.\n */\nconst writeTextLintIgnore = () => {\n const filePath = join(projectPath, \".textlintignore\");\n const content = \"\";\n\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .textlintignore already exists;\");\n\n return Promise.resolve();\n }\n\n return 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 // eslint-disable-next-line no-undef\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n})();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/textlint-config",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Anolilab Coding Standard for text linting.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"postinstall": "node ./skip.js || node ./dist/postinstall.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
+
"@anolilab/package-json-utils": "1.2.0",
|
|
47
48
|
"@textlint-rule/textlint-rule-no-invalid-control-character": "^2.0.0",
|
|
48
49
|
"@textlint-rule/textlint-rule-no-unmatched-pair": "^1.0.9",
|
|
49
50
|
"@textlint-rule/textlint-rule-preset-google": "^0.1.2",
|