Skip to content

Commit

Permalink
docs: add vale to project (#797)
Browse files Browse the repository at this point in the history
added vale.ini with vale configuration
set up vale gh action
added new style rules to vale
  • Loading branch information
TC-MO authored Jan 5, 2024
1 parent f3e9a9a commit 86507c5
Show file tree
Hide file tree
Showing 64 changed files with 2,838 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
# editorconfig-tools is unable to ignore longs strings or urls
max_line_length = null
max_line_length = 0
quote_type = single
10 changes: 10 additions & 0 deletions .github/styles/Apify/Apify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: false
level: warning
swap:
Apify Dashboard: Apify Console
apify freelancers: Apify freelancers
Apify Platfrom: Apify platform
'(?:[Tt]he\s)?[Aa]pify\sproxy': Apify Proxy
circa: approx.
9 changes: 9 additions & 0 deletions .github/styles/Apify/Capitalization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: "The word '%s' should always be capitalized."
ignorecase: false
level: error
tokens:
- '\bactor\b'
- '\bactors\b'
- '\bapify\b(?!-\w+)'
nonword: false
10 changes: 10 additions & 0 deletions .github/styles/Apify/Languages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: false
level: warning
swap:
'javascript|Javascript|javaScript': JavaScript
'(?<!-)python(?!-)': Python
'typescript|Typescript|typescript': TypeScript
'nodejs|Nodejs|node.js': Node.js
# Add more languages or common mistakes as needed
9 changes: 9 additions & 0 deletions .github/styles/Microsoft/AMPM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: Use 'AM' or 'PM' (preceded by a space).
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
level: error
nonword: true
tokens:
- '\d{1,2}[AP]M'
- '\d{1,2} ?[ap]m'
- '\d{1,2} ?[aApP]\.[mM]\.'
25 changes: 25 additions & 0 deletions .github/styles/Microsoft/Accessibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
extends: existence
message: "Don't use language (such as '%s') that defines people by their disability."
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms
level: suggestion
ignorecase: true
tokens:
- a victim of
- able-bodied
- affected by
- an epileptic
- crippled
- disabled
- dumb
- handicapped
- handicaps
- healthy
- lame
- maimed
- missing a limb
- mute
- normal
- sight-impaired
- stricken with
- suffers from
- vision-impaired
64 changes: 64 additions & 0 deletions .github/styles/Microsoft/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
extends: conditional
message: "'%s' has no definition."
link: https://docs.microsoft.com/en-us/style-guide/acronyms
level: suggestion
ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
# ... with the exception of these:
exceptions:
- API
- ASP
- CLI
- CPU
- CSS
- CSV
- DEBUG
- DOM
- DPI
- FAQ
- GCC
- GDB
- GET
- GPU
- GTK
- GUI
- HTML
- HTTP
- HTTPS
- IDE
- JAR
- JSON
- JSX
- LESS
- LLDB
- NET
- NOTE
- NVDA
- OSS
- PATH
- PDF
- PHP
- POST
- RAM
- REPL
- RSA
- SCM
- SCSS
- SDK
- SQL
- SSH
- SSL
- SVG
- TBD
- TCP
- TODO
- URI
- URL
- USB
- UTF
- XML
- XSS
- YAML
- ZIP
Loading

0 comments on commit 86507c5

Please sign in to comment.