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

Rule wishlist #2

Open
8 of 19 tasks
evaera opened this issue Dec 30, 2018 · 2 comments
Open
8 of 19 tasks

Rule wishlist #2

evaera opened this issue Dec 30, 2018 · 2 comments

Comments

@evaera
Copy link

evaera commented Dec 30, 2018

This issue will track any rules we'd like to offer for typescript-eslint.

Some of these might already exist as base rules, like no-null-keyword

  • Don't allow null
  • Don't allow void expression
  • Don't allow with statement
  • Don't allow debugger statement
  • Don't allow == or !=
  • Don't allow block labels
  • Don't allow regular expressions
  • Don't allow accessing function/class prototype or indexing any other value from a function
  • Don't allow yielding outside of async funtions
  • Don't allow reserved Lua keywords
  • Don't allow non-modules (e.g. don't allow global execution mode; must have one import/export)
  • Don't use this outside of an object or class
  • Server/client API access
  • Don't allow exports in non-ModuleScripts
  • ModuleScripts must export
  • Don't allow dynamic import() statement
  • Don't allow use of values typed as any
  • Show invalid identifier names (with odd characters like $) as errors
  • Don't allow rest operator for destructuring
@osyrisrblx osyrisrblx transferred this issue from roblox-ts/roblox-ts Aug 21, 2019
@Validark
Copy link
Contributor

Validark commented Aug 21, 2019

Throwing it out there:

  • ? Disallow LuaTuples being used in user-defined ways. Only allow LuaTuples for built-ins.
  • ? Suggest Object catastrophes be switched to Maps. (index signatures are hard)
  • ? Warn when a number is defined too precisely, e.g. 0.00000000000000000000001
  • ? Discuss disallowing import = require() statements ?

To be determined:

  • Unary plus operator?

@Validark Validark changed the title Custom TSLint rules Rule wishlist Aug 21, 2019
@osyrisrblx
Copy link
Member

osyrisrblx commented Sep 10, 2019

Future Rules

  • Warn to use ?? when using || on a number/string.

MobiusCraftFlip added a commit to MobiusCraftFlip/eslint-plugin-roblox-ts that referenced this issue May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants