The issue has been solved

@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.
- 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
.
- Using simple string searching instead of parsing. But errors position may not clear.
- 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
posted by sindresorhus about 6 years ago 
posted by issuehunt-app[bot] over 5 years ago