Skip to content

Commit f79cf72

Browse files
committed
Update doc
1 parent b832515 commit f79cf72

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Go to [Get Started](./started.md)
88

99
## Become a Sponsor
1010

11-
Is your company using eslint-plugin-vue-i18n, and related [Intlify](https://github.com/intlify) project i18n tools to build awesome apps? Become a sponsor to add your logo on this documentation! Supporting me on GitHub Sponsors and Patreon allows me to work less for a job and to work more on Free Open Source Software such as eslint-plugin-vue-i18n! Thank you!
11+
Is your company using eslint-plugin-vue-i18n, and related [Intlify](https://github.com/intlify) project i18n tools to build awesome apps? Become a sponsor to add your logo on this documentation! Supporting me on GitHub Sponsors allows me to work less for a job and to work more on Free Open Source Software such as eslint-plugin-vue-i18n! Thank you!
1212

1313
<p style="text-align: center;">
1414
<iframe src="https://github.com/sponsors/ota-meshi/card" title="Sponsor ota-meshi" height="225" width="600" style="border: 0;"></iframe>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@types/lodash": "^4.14.159",
5151
"@types/mocha": "^9.0.0",
5252
"@types/parse5": "^6.0.0",
53+
"@types/prettier": "^2.4.4",
5354
"@types/semver": "^7.3.4",
5455
"@typescript-eslint/eslint-plugin": "^5.2.0",
5556
"@typescript-eslint/parser": "^5.2.0",

scripts/update-docs-index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @author kazuya kawaguchi (a.k.a. kazupon)
44
* Forked by https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/scripts/update-docs-index.js
55
*/
6+
import prettier from 'prettier'
67
import { writeFileSync } from 'fs'
78
import { resolve } from 'path'
89
import type { RuleInfo } from './lib/rules'
@@ -33,13 +34,12 @@ ${rules.map(toTableRow).join('\n')}
3334
`
3435
}
3536

36-
writeFileSync(
37-
resolve(__dirname, '../docs/rules/README.md'),
38-
`# Available Rules
37+
const filePath = resolve(__dirname, '../docs/rules/README.md')
38+
const content = `# Available Rules
3939
4040
- :star: mark: the rule which is enabled by \`plugin:@intlify/vue-i18n/recommended\` preset.
4141
- :black_nib: mark: the rule which is fixable by \`eslint --fix\` command.
4242
4343
${withCategories.map(toCategorySection).join('\n')}
4444
`
45-
)
45+
writeFileSync(filePath, prettier.format(content, { filepath: filePath }))

scripts/update-rule-docs.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @author kazuya kawaguchi (a.k.a. kazupon)
44
* Forked by https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/scripts/update-docs-headers.js
55
*/
6+
import prettier from 'prettier'
67
import { writeFileSync, readFileSync } from 'fs'
78
import { join } from 'path'
89
import type { RuleInfo } from './lib/rules'
@@ -39,7 +40,10 @@ export function updateRuleDocs({
3940
}
4041

4142
write() {
42-
writeFileSync(this.filePath, this.content)
43+
writeFileSync(
44+
this.filePath,
45+
prettier.format(this.content, { filepath: this.filePath })
46+
)
4347
}
4448
updateFileIntro() {
4549
const rule = this.rule

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,11 @@
13221322
resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.2.tgz#99f6b72d82e34cea03a4d8f2ed72114d909c1c61"
13231323
integrity sha512-+hQX+WyJAOne7Fh3zF5CxPemILIbuhNcqHHodzK9caYOLnC8pD5efmPleRnw0z++LfKUC/sVNMwk0Gap+B0baA==
13241324

1325+
"@types/prettier@^2.4.4":
1326+
version "2.4.4"
1327+
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17"
1328+
integrity sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA==
1329+
13251330
"@types/q@^1.5.1":
13261331
version "1.5.5"
13271332
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df"

0 commit comments

Comments
 (0)