Skip to content

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Mar 12, 2020

tslint 6.1 adds support for TypeScript 3.8 syntax

See: https://github.com/palantir/tslint/blob/master/CHANGELOG.md#v610

Pr to update the package in the repo #17202

See individual commits for more details.

@alan-agius4 alan-agius4 added target: major This PR is targeted for the next major release and removed cla: yes labels Mar 12, 2020
@alan-agius4 alan-agius4 requested a review from filipesilva March 12, 2020 08:09
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Mar 12, 2020
@angular angular deleted a comment from googlebot Mar 12, 2020
@alan-agius4 alan-agius4 added needs: discussion On the agenda for team meeting to determine next steps and removed action: merge The PR is ready for merge by the caretaker labels Mar 12, 2020
@alan-agius4
Copy link
Collaborator Author

A number of recommended rules have been removed in version 6, Should we add them in our tslint.json or not?

https://github.com/palantir/tslint/pull/4871/files and https://github.com/palantir/tslint/pull/4312/files

@dgp1130
Copy link
Collaborator

dgp1130 commented Mar 12, 2020

Discussed whether to preserve existing configs from previous version or accept new changes from TSLint.

New projects should include the new version and have a custom config with all the old rules from the previous TSLint version.

Existing projects in 9.x should have a migration allowing users to update to TSLint 6.1 if they choose to and include the old rules into their config.

In v10 we would enable the migration for everyone, need to consider how this works with Prettier as well.

This will prevent projects from backsliding on formatting. Once we get to ESLint migration, we can revisit how to best make that happen.

@dgp1130 dgp1130 removed the needs: discussion On the agenda for team meeting to determine next steps label Mar 12, 2020
@alan-agius4 alan-agius4 requested a review from clydin March 13, 2020 09:17
@alan-agius4 alan-agius4 linked an issue Mar 13, 2020 that may be closed by this pull request
15 tasks
@cexbrayat
Copy link
Member

@alan-agius4 Thank you for considering my proposition!
I just reviewed the updated rules and it looks good to me, except one tiny nit: variable-name has been relaxed and now allows names with a leading underscore, whereas it wasn't previously.
So to be stricly similar to what we had, I think the CLI tslint should include:

    "variable-name": {
        "options": ["ban-keywords", "check-format", "allow-pascal-case"],
    },

In tslint version 6, several recommanded rules have been removed in the following PRs:
palantir/tslint#4871 palantir/tslint#4312

With this change, we bring back these rules in the CLI.
In tslint version 6, several recommanded rules have been removed in the following PRs:
palantir/tslint#4871 palantir/tslint#4312

With this migration we update the tslint depedency to 6+ and add back these rules in the user workspace `tslint.json` also we remove some deprecated rules.

Until version 10, this is an opt-in migration and users will need to run this manually with the below command:
```
ng update @angular/cli --migrate-only tslint-version-6
```

Closes: #17117
Reference: TOOL-1348
@alan-agius4
Copy link
Collaborator Author

@clydin PTAL

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Mar 16, 2020
@mgechev mgechev merged commit a144e82 into angular:master Mar 17, 2020
@alan-agius4 alan-agius4 deleted the tslint-6-0-0 branch March 17, 2020 07:00
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng update should have removed tslint setting no-use-before-declare
7 participants