vale: Update configuration

This commit is contained in:
Sanchayan Maity 2023-12-27 22:28:02 +05:30
parent 1c31dba3a4
commit e4b3b7370d
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3
12 changed files with 39 additions and 32 deletions

View file

@ -1,5 +1,5 @@
extends: substitution
message: "Feel free to use '%s' instead of '%s'."
message: "Use '%s' instead of '%s'."
link: 'https://developers.google.com/style/contractions'
level: suggestion
ignorecase: true

View file

@ -3,5 +3,7 @@ message: "Don't use exclamation points in text."
link: 'https://developers.google.com/style/exclamation-points'
nonword: true
level: error
action:
name: remove
tokens:
- '\w!(?:\s|$)'
- '\w+!(?:\s|$)'

View file

@ -3,6 +3,8 @@ message: "Consider using '%s' instead of '%s'."
link: 'https://developers.google.com/style/inclusive-documentation'
ignorecase: true
level: error
action:
name: replace
swap:
(?:alumna|alumnus): graduate
(?:alumnae|alumni): graduates

View file

@ -1,15 +1,14 @@
extends: capitalization
message: "'%s' should use sentence-style capitalization."
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings'
link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings"
level: warning
scope: heading
match: $sentence
indicators:
- ':'
- ":"
exceptions:
- Azure
- CLI
- Code
- Cosmos
- Docker
- Emmet

View file

@ -7,5 +7,5 @@ nonword: true
action:
name: replace
swap:
'\b(?:eg|e\.g\.)[\s,]': for example
'\b(?:ie|i\.e\.)[\s,]': that is
'\b(?:eg|e\.g\.)(?=[\s,;])': for example
'\b(?:ie|i\.e\.)(?=[\s,;])': that is

View file

@ -3,6 +3,8 @@ message: "'%s' should have one space."
link: 'https://developers.google.com/style/sentence-spacing'
level: error
nonword: true
action:
name: remove
tokens:
- '[a-z][.?!] {2,}[A-Z]'
- '[a-z][.?!][A-Z]'

View file

@ -5,4 +5,6 @@ ignorecase: true
level: warning
tokens:
- '(?:\w+)nised?'
- '(?:\w+)logue'
- 'colour'
- 'labour'
- 'centre'

View file

@ -1,8 +1,8 @@
extends: existence
message: "Put a nonbreaking space between the number and the unit in '%s'."
link: 'https://developers.google.com/style/units-of-measure'
link: "https://developers.google.com/style/units-of-measure"
nonword: true
level: error
tokens:
- \d+(?:B|kB|MB|GB|TB)
- \d+(?:ns|ms|s|min|h|d)
- \b\d+(?:B|kB|MB|GB|TB)
- \b\d+(?:ns|ms|s|min|h|d)

View file

@ -1,30 +1,31 @@
extends: substitution
message: "Use '%s' instead of '%s'."
link: 'https://developers.google.com/style/word-list'
link: "https://developers.google.com/style/word-list"
level: warning
ignorecase: false
action:
name: replace
swap:
'(?:API Console|dev|developer) key': API key
'(?:cell ?phone|smart ?phone)': phone|mobile phone
'(?:dev|developer|APIs) console': API console
'(?:e-mail|Email|E-mail)': email
'(?:file ?path|path ?name)': path
'(?:kill|terminate|abort)': stop|exit|cancel|end
'(?:OAuth ?2|Oauth)': OAuth 2.0
'(?:ok|Okay)': OK|okay
'(?:WiFi|wifi)': Wi-Fi
"(?:API Console|dev|developer) key": API key
"(?:cell ?phone|smart ?phone)": phone|mobile phone
"(?:dev|developer|APIs) console": API console
"(?:e-mail|Email|E-mail)": email
"(?:file ?path|path ?name)": path
"(?:kill|terminate|abort)": stop|exit|cancel|end
"(?:OAuth ?2|Oauth)": OAuth 2.0
"(?:ok|Okay)": OK|okay
"(?:WiFi|wifi)": Wi-Fi
'[\.]+apk': APK
'3\-D': 3D
'Google (?:I\-O|IO)': Google I/O
'tap (?:&|and) hold': touch & hold
'un(?:check|select)': clear
"tap (?:&|and) hold": touch & hold
"un(?:check|select)": clear
above: preceding
account name: username
action bar: app bar
admin: administrator
Ajax: AJAX
a\.k\.a|aka: or|also known as
Android device: Android-powered device
android: Android
API explorer: APIs Explorer

View file

@ -22,7 +22,7 @@ swap:
should not: shouldn't
'that is(?!\.)': that's
"that is(?![.,])": that's
'that''s(?=\.)': that is
'they are(?!\.)': they're

View file

@ -9,4 +9,5 @@ action:
swap:
'\b(?:eg|e\.g\.)[\s,]': for example
'\b(?:ie|i\.e\.)[\s,]': that is
'\b(?:viz\.)[\s,]': namely
'\b(?:ergo)[\s,]': therefore

View file

@ -1,5 +1,7 @@
extends: substitution
message: "Prefer '%s' over '%s'."
# term preference should be based on microsoft style guide, such as
link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/adapter
level: warning
ignorecase: true
action:
@ -24,10 +26,8 @@ swap:
anti-spyware: antispyware
anti-virus: antivirus
appendixes: appendices
artificial intelligence: artificial intelligence
assembler: assembly language
bpp: bpp
bps: bps
artificial intelligence: AI
'(?:assembler|machine language)': assembly language
caap: CaaP
conversation-as-a-platform: conversation as a platform
eb: EB
@ -39,5 +39,3 @@ swap:
pb: PB
tb: TB
zb: ZB
viz: namely
ergo: therefore