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

nrwl/linter:lint "-- fix" not an option #1703

Closed
Jordan-Hall opened this issue Aug 12, 2019 · 3 comments
Closed

nrwl/linter:lint "-- fix" not an option #1703

Jordan-Hall opened this issue Aug 12, 2019 · 3 comments
Labels

Comments

@Jordan-Hall
Copy link
Contributor

Running into issues with using lint --fix. Part of the git hooks we require to fix any linting and formatting rules. Recently created four new libraries and running into an issue with auto fix. two using eslint and two using tslint

Expected Behavior

ng lint "project name" --fix

should attempt to fix any linting issues

Current Behavior

Unknown option: '--fix'

Failure Information (for bugs)

command
ng "lint" "tmp-mapper" "--fix"

"tmp-mapper": {
      "root": "libs/mapper",
      "sourceRoot": "libs/mapper/src",
      "projectType": "library",
      "schematics": {},
      "architect": {
        "lint": {
          "builder": "@nrwl/linter:lint",
          "options": {
            "linter": "tslint",
            "tsConfig": [
              "libs/mapper/tsconfig.lib.json",
              "libs/mapper/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**",
              "!libs/mapper/**"
            ]
          }
        },
        "test": {
          "builder": "@nrwl/jest:jest",
          "options": {
            "jestConfig": "libs/mapper/jest.config.js",
            "tsConfig": "libs/mapper/tsconfig.spec.json"
          }
        }
      }
    },
@mehrad-rafigh
Copy link
Contributor

@Jordan-Hall Can you please provide a repo where I can reproduce this?

@Jordan-Hall
Copy link
Contributor Author

@mehrad-rafigh https://github.com/Jordan-Hall/nx-lint-reproduce

It appears this time for tslint it used the angular tslint. However, the eslint one still fails. I have changed the angular.json to use the @nrwl/linter:lint with the linter option to tslint. It appears @nrwl/linter:lint just doesn't support auto fixing

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants