Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

Warning: member-ordering - Direct string option is deprecated #66

Open
8 tasks
deefactorial opened this issue Apr 9, 2020 · 1 comment
Open
8 tasks

Comments

@deefactorial
Copy link

I'm submitting a ... (check one with "x")

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request

Current behavior

I'm getting warnings for one of the rules in this library

Expected/desired behavior

I should not get any warnings

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

add "extends": ["angular-tslint-rules"] to tslint.json and run linting

Environment

  • Angular version: 8.2.14
  • Browser:
  • Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • Edge version XX
  • For Tooling issues:
  • Node version: v10.19.0
  • Platform: Linux
  • Others:

"typescript": "~3.4.5",

Full warning:

Warning: member-ordering - Direct string option is deprecated and does not support accessors.
See also https://palantir.github.io/tslint/rules/member-ordering/
You should replace "public-before-private","static-before-instance","variables-before-functions"
with the following equivalent options and add -accessor categories as appropriate:
[
  {
    "name": "public static field",
    "kinds": [
      "public-static-field",
      "protected-static-field"
    ]
  },
  {
    "name": "private static field",
    "kinds": [
      "private-static-field"
    ]
  },
  {
    "name": "public instance field",
    "kinds": [
      "public-instance-field",
      "protected-instance-field"
    ]
  },
  {
    "name": "private instance field",
    "kinds": [
      "private-instance-field"
    ]
  },
  {
    "name": "public static method",
    "kinds": [
      "public-static-method",
      "protected-static-method",
      "public-static-accessor",
      "protected-static-accessor"
    ]
  },
  {
    "name": "private static method",
    "kinds": [
      "private-static-method",
      "private-static-accessor"
    ]
  },
  {
    "name": "public instance method",
    "kinds": [
      "public-constructor",
      "protected-constructor",
      "public-instance-method",
      "protected-instance-method",
      "public-instance-accessor",
      "protected-instance-accessor"
    ]
  },
  {
    "name": "private instance method",
    "kinds": [
      "private-constructor",
      "private-instance-method",
      "private-instance-accessor"
    ]
  }
]
@apeeters
Copy link

There is a PR to fix this: #63, and its duplicate #68.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants