sindresorhus/awesome-lint

Ensure the maintainer has added their own email to the Code of Conduct #58

sindresorhus posted onGitHub

Not like https://github.com/secretGeek/AwesomeCSV/blob/af54de5e9874ab1b04d7e6f325a70871287881c4/code-of-conduct.md where it still has [INSERT EMAIL ADDRESS]. I've also experienced many lists just copy-pasting from my lists, which means my email remained there. So that should be caught too.


@issuehunt has funded $40.00 to this issue.


posted by IssueHuntBot about 6 years ago

Let's confirm something before coding.

  • Is a COC file required? I think it can be optional.
  • What names can a COC file be? I will cover these, like coc/codeofconduct/code-of-conduct. All of them are case insensitive and the file suffix is md.
  • Report error if [INSERT EMAIL ADDRESS] was found. But not check at least a valid email is there.
posted by chinesedfan about 6 years ago

Is a COC file required? I think it can be optional.

It's optional.

What names can a COC file be? I will cover these, like coc/codeofconduct/code-of-conduct. All of them are case insensitive and the file suffix is md.

  • code-of-conduct.md
  • code_of_conduct.md
  • CODE_OF_CONDUCT.md
  • CODE_OF_CONDUCT.md

It can be in the root or in /.github.

Report error if [INSERT EMAIL ADDRESS] was found. But not check at least a valid email is there.

Ensure the placeholder is not there and that the email there is not mine sindresorhus@gmail.com, unless it's my repos. A lot of people copy the file from my Awesome repo and doesn't change the email.

posted by sindresorhus about 6 years ago

@sindresorhus How can a lint rule know it is in your repos? Check the repository field in package.json?

posted by chinesedfan about 6 years ago

Yes, or the given URL, if it's a remote lint: $ awesome-lint https://github.com/sindresorhus/awesome-nodejs

posted by sindresorhus about 6 years ago

@sindresorhus The current rules-design was focused on linting readme.md. Which way do you prefer? Currently, I chose the first.

  1. If added this rule in the same folder, I would have to parse code-of-conduct.md inside the rule file (see my branch). In fact, the output will be weird because positions do not belong to readme.md.
  2. Using simple string searching instead of parsing. But errors position may not clear.
  3. Or refactoring the whole project?
posted by chinesedfan about 6 years ago

@chinesedfan Another option it to write this rule just like the other rules, and then use it directly from index.js (not rules/index.js), passing it the parsed code-of-conduct.md. Personally, this seems like a simpler approach than the ones you suggested above.

posted by itaisteinherz about 6 years ago

@itaisteinherz That's what I mean refactoring. Hmm, whole project. My words sounds a little exaggerated. Because there already have many PRs, I will delay to do that. (cc @transitive-bullshit @sindresorhus)

posted by chinesedfan about 6 years ago

Another option it to write this rule just like the other rules, and then use it directly from index.js (not rules/index.js), passing it the parsed code-of-conduct.md. Personally, this seems like a simpler approach than the ones you suggested above.

šŸ‘


Just for evidence, another case of using my email: https://github.com/dspinellis/awesome-msr/blob/d445bca2b8bdb53435e6ccb64cec8d8f51a65f1b/code-of-conduct.md

posted by sindresorhus about 6 years ago

@sindresorhus has rewarded $36.00 to @chinesedfan. See it on IssueHunt

  • :moneybag: Total deposit: $40.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $4.00
posted by issuehunt-app[bot] over 5 years ago

Fund this Issue

$40.00
Rewarded

Rewarded pull request

Recent activities

chinesedfan was rewarded by sindresorhus for sindresorhus/awesome-lint# 58
over 5 years ago
chinesedfan submitted an output to  sindresorhus/ awesome-lint# 58
almost 6 years ago