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] Linting not Enforced #74

Open
AmanNegi opened this issue Mar 22, 2024 · 0 comments
Open

[Bug] Linting not Enforced #74

AmanNegi opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AmanNegi
Copy link

AmanNegi commented Mar 22, 2024

What happened?

Each repository has a tslint.json however the styles are not enforced and I noticed this throughout multiple (rocket.chat.app) repositories. While each repository has a tslint.json there are no scripts provided in package.json to ensure the linting of code.

Other than that, I learned that tslint has been outdated and replaced with eslint.json so it might be a good time to switch out to eslint.json and ensure code consistency and style.

image

Steps to reproduce

I was however able to run the lint process without adding the script to package.json. Here's how you can reproduce this:

npm i -g tslint
npm i -g typescript
tslint --project .

This will run the linting process in the project, and you will be now prompted with a series of error that do not match the tslint.json convention.

Below we have our tslint.json which enforces certain styles but are not really enforced into the code.

{
    "extends": "tslint:recommended",
    "rules": {
      "array-type": [true, "generic"],
      "member-access": true,
      "no-console": [false],
      "no-duplicate-variable": true,
      "object-literal-sort-keys": false,
      "quotemark": [true, "single"], 
      "max-line-length": [true, {
          "limit": 160,
          "ignore-pattern": "^import | *export .*? {"
      }]
    }
}

As you can see this enforces the quote mark as single, however it's not how it's being used in the project, or rather any of the projects.

Relevant ScreenShots

Here are the logs as output:
https://pastebin.com/qx6BNZFP

We can use tslint --project . --fix to fix the issues but that causes changes to more than 90+ files together. Also it might be a nice idea to switch to eslint as it is supported currently.

Version

latest

What browsers are you seeing the problem on?

Chrome

@AmanNegi AmanNegi added the bug Something isn't working label Mar 22, 2024
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
Development

No branches or pull requests

1 participant