You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
The only way to use JavaScript and maintain sanity is to ban 90% of it.
That's why there are many current and desired tslint rules that do nothing but ban a particular kind of syntax from appearing. May not always be as simple as banning a SyntaxKind, but it's usually very simple.
My proposal is to deprecate them all and have a single rule ban-syntax rule that is configurable.
It would behave the same as the separate rules, but would help cut down on rule bloat.
The text was updated successfully, but these errors were encountered:
One problem would be that // tslint:disable ban-syntax isn't as nice as // tslint:disable no-bitwise. ban-types has the same problem.
But I also think the Rules list is getting kind of intimidating.
Other possible downside (or plus side for someone) - using extend in tslint.json: If new rule can be added to tslint:recommend with own configuration - than it will be applied to consumers code.
With single rule list of banned syntaxes will be overridden(if I remember it correctly) and changes to recommended config won't have any effect.
The only way to use JavaScript and maintain sanity is to ban 90% of it.
That's why there are many current and desired tslint rules that do nothing but ban a particular kind of syntax from appearing. May not always be as simple as banning a SyntaxKind, but it's usually very simple.
import "foo";
no-import-side-effect
any
no-any
namespace
no-namespace
x!
no-non-null-assertion
/// <reference path="">
no-reference
<<<
,~
, etc.no-bitwise
debugger
no-debugger
eval
no-eval
null
no-null-keyword
var
no-var-keyword
==
/!=
triple-equals
<T> x
no-angle-bracket-type-assertion
constructor(public x)
no-parameter-properties
export default
no-default-export
class
,this
,new
no-class
,no-this
,no-new
let
,arguments
no-let
,no-arguments
label: while (true) {}
no-label
[,]
no-sparse-arrays
(#2407)delete
x in y
for (x in y)
with (x) {}
{ [x: string]: number }
import x = require("y");
;
(empty statement)new.target
My proposal is to deprecate them all and have a single rule
ban-syntax
rule that is configurable.It would behave the same as the separate rules, but would help cut down on rule bloat.
The text was updated successfully, but these errors were encountered: