Skip to content
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

Bug: [lines-around-comment] afterHashbangComment option is not supported on TS #75

Closed
IronGeek opened this issue Nov 14, 2023 · 0 comments · Fixed by #161
Closed

Bug: [lines-around-comment] afterHashbangComment option is not supported on TS #75

IronGeek opened this issue Nov 14, 2023 · 0 comments · Fixed by #161
Labels
bug Something isn't working

Comments

@IronGeek
Copy link

Cross-posting issue from typescript-eslint/typescript-eslint#6636


Playground Link

https://typescript-eslint.io/play/#ts=5.0.1-rc&sourceType=module&code=MQQgZg9hBQBuCGAnABAE3gT2QXmQIgHNEBTeAFz2iA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6RplWgQ2gHtYTACa0yfALbjELdGADa4bDkTR+0SABpFSrEuyRuAM3wqAEt2QALAEbcmAcwDCEqTIz44ibdgC+3gLqKfj5AA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA

Repro Code

#!foo
var day = "great"

ESLint Config

module.exports = {
  parser: "@typescript-eslint/parser",
  rules: {
    "@typescript-eslint/lines-around-comment": [
      "error",
      {
        "afterHashbangComment": true
      }
    ]
  },
};
tsconfig
{
  "compilerOptions": {
    // ...
  }
}

Expected Result

Should not crash, should warn about missing blank line after hashbang comment

Actual Result

Configuration for rule "@typescript-eslint/lines-around-comment" is invalid:
Value {"afterHashbangComment":true,"beforeBlockComment":true,"afterBlockComment":false,"beforeLineComment":false,"afterLineComment":false,"allowBlockStart":false,"allowBlockEnd":false} should NOT have additional properties.

Additional Info

The playground example doesn't crash, but CLI crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants