Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docs: improve document's header #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
michalsnik merged 6 commits into master from improve-docs
Sep 18, 2017
Merged

Docs: improve document's header #142

michalsnik merged 6 commits into master from improve-docs
Sep 18, 2017

Conversation

Copy link
Member

@mysticatea mysticatea commented Aug 9, 2017

This PR improves the header of rule documents.

npm run update generates the headers from rule's meta data.

Copy link
Contributor

@armano2 armano2 left a comment

Choose a reason for hiding this comment

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

There is mismatch in first line of rules, sometimes first word is lowercase and sometimes its starting with capital case

Copy link
Member Author

I added internal rules which are mostly same as eslint/lib/internal-rules to be consistent of rule descriptions.

@@ -37,7 +37,7 @@ SOFTWARE.
module.exports = {
meta: {
docs: {
description: 'Prevent variables used in JSX to be marked as unused',
description: 'prevent variables used in JSX to be marked as unused.', // eslint-disable-line consistent-docs-description
Copy link
Member

@michalsnik michalsnik Aug 15, 2017

Choose a reason for hiding this comment

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

Why do you disable consistent-docs-description rule on this line? Can't you remove the dot?

Copy link
Member Author

@mysticatea mysticatea Aug 16, 2017

Choose a reason for hiding this comment

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

Because it does not fit to descriptions which start with one of enforce, require and disallow. The consistent-docs-description rule which is cloned from eslint repo enforces the first word of the description.

@@ -90,7 +90,7 @@ module.exports = {
create,
meta: {
docs: {
description: 'disallow duplicate attributes.',
description: 'disallow duplicate attributes',
Copy link
Member

@michalsnik michalsnik Aug 15, 2017

Choose a reason for hiding this comment

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

To be consistent we should call it: disallow duplication of attributes

mysticatea reacted with thumbs up emoji
@@ -49,7 +49,7 @@ function create (context) {
module.exports = {
meta: {
docs: {
description: 'Prevent overwrite reserved keys.',
description: 'disallow overwrite reserved keys',
Copy link
Member

@michalsnik michalsnik Aug 15, 2017

Choose a reason for hiding this comment

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

disallow overwriting reserved keys

mysticatea reacted with thumbs up emoji
@@ -110,3 +110,21 @@ fs.writeFileSync(
recommendedRulesFile,
recommendedRulesContent
)

// Update the header of rule documents.
const headerPattern = /^#[^\n]*\n+(?:- .+\n)*\n*/
Copy link
Member

@michalsnik michalsnik Aug 15, 2017

Choose a reason for hiding this comment

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

I'd add a block comment here with example .md that matches this pattern.

mysticatea reacted with thumbs up emoji
Copy link
Member

Hey @mysticatea would you mind to update this PR? Then we could push this forward, should be quick to resolve my suggestions :)

Copy link
Member Author

Oops, I'm sorry, I have lost this from my brain. I will do.

@michalsnik michalsnik merged commit 94f387e into master Sep 18, 2017
@michalsnik michalsnik deleted the improve-docs branch September 18, 2017 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
2 more reviewers

@armano2 armano2 armano2 requested changes

@michalsnik michalsnik michalsnik approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /