question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

port custom tslint-rules in codebase to use eslint

See original GitHub issue

The writing is on the wall for the tslint ecosystem - the TypeScript team are planning to focus on how to make eslint work nicely with TypeScript projects in the first half of 2019, and the maintainers of tslint announced their roadmap for deprecating things to transition to using eslint.

This affects us in a couple of ways, but something we can do today is investigate porting these custom rules to use eslint, so we can lessen our dependency on tslint while upstream tooling is doing it’s thing.

These rules are very Desktop specific, and are not likely to have external replacements we could churn away to:

  • tslint-rules/buttonGroupOrderRule.ts
  • tslint-rules/reactNoUnboundDispatcherPropsRule.ts
  • tslint-rules/reactReadonlyPropsAndStateRule.ts

This rule could be something we could churn away to, if there’s a more complete implementation out there:

  • tslint-rules/reactProperLifecycleMethodsRule.ts

cc @j-f1 for thoughts and advice

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, Mar 5, 2019

@j-f1

How about removing the check on the parameters? That should be covered by TS now.

I gather you’re referring to the @types/react declarations here, rather than anything included by default with tsc?

I agree the ban on typos is still valid and it makes sense to keep it.

I’m still a big fan of how this rule ensure the parameters are named consistently (matching the React docs), and would advocate for keeping that around…

1reaction
j-f1commented, Feb 20, 2019

Depends on #6771 for some type info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to write custom ESLint rules - Mews Developers
Creating custom ESLint rules isn't hard once you have the framework in place. Paste your valid and invalid code examples into an AST...
Read more >
How to Improve Your Codebase!? | Custom ESLint Rules
While working in an organisation, we try to find ways to contribute to the more significant engineering initiatives. We want to be impactful ......
Read more >
Writing custom EsLint rules - Kenneth Truyers
In this post I want to talk about creating project specific custom EsLint rules. It's easily transferrable to a more common use plugin...
Read more >
Create custom ESLint rules in 2 minutes - Webiny
Create custom ESLint rules in 2 minutes ... ESLint is a great tool when it comes to code standardization. Maintained by the open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found