0

I'm very new to Nx and today I tried to migrate all our Angular apps from TSLint to ESLint. What I did was to run the following command for each app:

nx g convert-tslint-to-eslint --project=SELECTED_PROJECT

After the migration I ran npm install and then npm run lint. But each time I run the linter, I get the following error without any detailed information:

Cannot read properties of undefined (reading 'start')

The project specs:

  • Angular v12.2.13
  • Nx v12.10.1

Any idea what might be wrong?

Ricky
  • 2,912
  • 8
  • 47
  • 74

1 Answers1

2

I found the origin on the problem. The issue is related with this ESLint rule:

"indent": [
      "error",
      4,
      {
        "SwitchCase": 1
      }
    ],

Have no idea why it's breaking with this rule. For now I removed it and using the overrides to apply this rule:

"@typescript-eslint/indent": [
          "error",
          4,
          {
            "FunctionDeclaration": {
              "parameters": "first"
            },
            "FunctionExpression": {
              "parameters": "first"
            }
          }
        ],

If anyone finds a better way to solve this issue, please let me know.

Ricky
  • 2,912
  • 8
  • 47
  • 74