Skip to content

Missing @hapi/scope-start enforcement for comments #32

Description

@kanongil

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): yes

Context

  • node version: any
  • module version with issue: 6.0.0
  • last module version without issue: unknown
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): eslint
  • any other relevant information:

What are you trying to achieve or the steps to reproduce?

Enable standardised linting syntax using the @hapi/scope-start rule for comments at the start of a function scope:

const ok = function () {
    // This line should create a linter warning

    return true;
};

What was the result you got?

Pass.

What result did you expect?

A warning due to missing empty line at start of function, similar to when any statement / expression is there.

As an aside, it would be nice if the generated warning only marks the line that needs to be moved, rather than the full function block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug or defect

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions