-
Notifications
You must be signed in to change notification settings - Fork 25
Description
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.
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
