angular-tslint-rules icon indicating copy to clipboard operation
angular-tslint-rules copied to clipboard

Warning: member-ordering - Direct string option is deprecated

Open deefactorial opened this issue 5 years ago • 1 comments

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"
    ]
  }
]

deefactorial avatar Apr 09 '20 16:04 deefactorial

There is a PR to fix this: https://github.com/fulls1z3/angular-tslint-rules/pull/63, and its duplicate https://github.com/fulls1z3/angular-tslint-rules/pull/68.

apeeters avatar Oct 12 '20 15:10 apeeters