Zum Hauptinhalt springen
••••••••••••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Practicing politeness in JavaScript code 🤬

Imagine that you published a big open source project and many people are currently changing your code or updating the project documents. what if someone…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

Imagine that you published a big open source project and many people are currently changing your code or updating the project documents.



what if someone accidently write something race related , gender favoring , polarizing and etc... 👀



cat typing



we have a tool called alex !



According to what is written in the documentation of this tool:




Whether your own or someone else’s writing, alex helps you find gender favoring, polarizing, race related, or other unequal phrasing in text.







Set up Alex in our project



in order to use alex inside our project , first we need to install its package.



it will be a good practice if you install alex as a dev-dependency

or you can just install it globally in your system.




npm i -D alex 






Alex reads plain text, HTML, MDX, or markdown as input.



One of its uses is to scan all project documents for any literary issues.



Let’s assume that all our documents are written in Markdown format, so we instruct Alex to check all files with a .md extension



In our package.json file, we can create a script like:




{
"scripts": {
"test-doc" : "npx alex *.md"
}






After that, I create a file called policy.md as an example document:




## the boogeyman walked to class






if you run the test-doc command, you will probably get this result:




> test-doc
> npx alex *.md

policy.md
1:8-1:17 warning `boogeyman` may be insensitive, use `boogeymonster` instead boogeyman-boogeywoman retext-equality

‼ 1 warning






You can use this command together with tools such as Husky ** and **lint-staged to run the process of checking your files automatically. 🤖



What are your thoughts on this tool, and how crucial is compliance with this matter for software projects? 🧐🤗

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Practicing politeness in JavaScript code 🤬

Thematisch verwandte Begriffe: Practicing, politeness, JavaScript, code · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag