Skip to content

Conversation

@rickhanlonii
Copy link
Member

@rickhanlonii rickhanlonii commented Oct 14, 2019

Overview

This PR number 1337, adds alexjs linting to the /docs folder to prevent insensitive and inconsiderate language from landing on master.

  • Adds Alex
  • Configures Alex rules
  • Adds to circleci tests as land-blocking

Blocker

This PR fixes 193 lint issues that exist in the current docs. Once that PR is merged into this one, we can merge this PR into master.

PRs are separated to make reviewing this one easier.

What about versioned docs

Right now we're only linting the master docs in the /docs folder. Older docs in the website/versioned_docs directory are not linted.

Once we fix those docs, we can enable linting everywhere.

@react-native-bot
Copy link

react-native-bot commented Oct 14, 2019

Deploy preview for react-native ready!

Built with commit 1cda08e

https://deploy-preview-1337--react-native.netlify.com

Changes to docs/ are reflected in the next "master" version.

Thank you for your contributions.

How to ContributeDocumentation Sources

@rickhanlonii rickhanlonii marked this pull request as ready for review October 14, 2019 16:06
@rickhanlonii
Copy link
Member Author

Merge blocked on rickhanlonii#1, but feel free to review and approve this one first

"invalid",

// Unfortunately "watchman" is a library name that we depend on.
"watchman-watchwoman"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are just two rules that we're opting out of

];

// Use a "maybe" level of profanity instead of the default "unlikely".
exports.profanitySureness = 1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this is set to 0 it is too eager, it catches words like "color", "execute", and "fire" which in our context are super unlikely to be profane and highly likely to be valid

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you put your reasoning as a comment in the code?

@rickhanlonii
Copy link
Member Author

Shout out @wooorm for the help and alexjs ✨

@elicwhite
Copy link
Member

Wow, lots of warnings on the lint job! I'm glad we are cleaning this up. Thanks for setting this up.

It would be great if you could also hook this up to also comment back on the PR at the line. We have a bot set up to do that on the main RN repo for eslint issues.

@rickhanlonii rickhanlonii changed the title [WIP] Add linting for insensitive and inconsiderate language Add linting for insensitive and inconsiderate language Oct 14, 2019
@rickhanlonii
Copy link
Member Author

Update: I merged in the changes from rickhanlonii#1 and added a new yarn lintv command to help with linting the versioned docs

@rickhanlonii rickhanlonii merged commit 0c9962b into facebook:master Oct 14, 2019
@rickhanlonii rickhanlonii deleted the rh-add-alex branch October 14, 2019 19:13
jeresig added a commit to Khan/wonder-blocks that referenced this pull request Oct 15, 2019
This was added to React Native recently and I thought it was a good idea!
facebook/react-native-website#1337

More information: https://alexjs.com/

I think the one piece of our API we could consider changing would be "disabled", but I have deferred that for now.

This feels like a pretty harmless linter and is easy to configure as well, may be worth a shot giving it a try!

Test plan:
I ran `yarn alex` and it passed!
jeresig added a commit to Khan/wonder-blocks that referenced this pull request Oct 15, 2019
This was added to React Native recently and I thought it was a good idea!
facebook/react-native-website#1337

More information: https://alexjs.com/

I think the one piece of our API we could consider changing would be "disabled", but I have deferred that for now.

This feels like a pretty harmless linter and is easy to configure as well, may be worth a shot giving it a try!

Test plan:
I ran `yarn alex` and it passed!
@pvinis
Copy link
Contributor

pvinis commented Oct 16, 2019

I love the removal of "just" and "simply", but I don't think "easy" -> "quick" or "simple" -> "basic" is an improvement 😬

@rickhanlonii rickhanlonii self-assigned this Oct 17, 2019
@rickhanlonii
Copy link
Member Author

@pvinis I hear you.

The way I think about it, "simple" seems to be a characteristic of knowledge while "basic" is a characteristic of form. Something can be "basic" (is made of few parts) but not "simple" (easily understood). By focusing on the form instead of the knowledge characteristic then the docs are more inclusive

If you feel strongly I would recommend reaching out to the retext repo and getting it added there and we would address it in the repo here ✨

facebook-github-bot pushed a commit to facebookarchive/draft-js that referenced this pull request Oct 22, 2019
Summary:
**Summary**

This PR, similarly to facebook/react-native-website#1337, adds [alexjs](https://alexjs.com/) linting to Draft.js in order to identify and prevent insensitive and inconsiderate language from landing on master.

- Adds Alex
- Configures Alex rules
- **TODO:** Run Alex in Travis CI

**Test Plan**

- Run `yarn lint-docs`
- Verify there are no lint violations
Pull Request resolved: #2223

Differential Revision: D18046996

Pulled By: claudiopro

fbshipit-source-id: 66ac935720a0b13576e9a133a3d5f8e98cc539cf
espipj pushed a commit to espipj/react-native-website that referenced this pull request Feb 8, 2020
* Add linting for insensitive and inconsiderate language

* Add .alexrc.js

* Update alex rules

* Minor updates to formatting

* Fix deploy_website job name

* Update alex rules

* Add lintv and .alexignore

* Fix lint issues
mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
…ve#2223)

Summary:
**Summary**

This PR, similarly to facebook/react-native-website#1337, adds [alexjs](https://alexjs.com/) linting to Draft.js in order to identify and prevent insensitive and inconsiderate language from landing on master.

- Adds Alex
- Configures Alex rules
- **TODO:** Run Alex in Travis CI

**Test Plan**

- Run `yarn lint-docs`
- Verify there are no lint violations
Pull Request resolved: facebookarchive#2223

Differential Revision: D18046996

Pulled By: claudiopro

fbshipit-source-id: 66ac935720a0b13576e9a133a3d5f8e98cc539cf
vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
…ve#2223)

Summary:
**Summary**

This PR, similarly to facebook/react-native-website#1337, adds [alexjs](https://alexjs.com/) linting to Draft.js in order to identify and prevent insensitive and inconsiderate language from landing on master.

- Adds Alex
- Configures Alex rules
- **TODO:** Run Alex in Travis CI

**Test Plan**

- Run `yarn lint-docs`
- Verify there are no lint violations
Pull Request resolved: facebookarchive#2223

Differential Revision: D18046996

Pulled By: claudiopro

fbshipit-source-id: 66ac935720a0b13576e9a133a3d5f8e98cc539cf
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
**Summary**

This PR, similarly to facebook/react-native-website#1337, adds [alexjs](https://alexjs.com/) linting to Draft.js in order to identify and prevent insensitive and inconsiderate language from landing on master.

- Adds Alex
- Configures Alex rules
- **TODO:** Run Alex in Travis CI

**Test Plan**

- Run `yarn lint-docs`
- Verify there are no lint violations
Pull Request resolved: facebookarchive/draft-js#2223

Differential Revision: D18046996

Pulled By: claudiopro

fbshipit-source-id: 66ac935720a0b13576e9a133a3d5f8e98cc539cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants