tslint-microsoft-contrib/tests/prefer-array-literal
Andrii Dieiev f85d5f6dbc
Improve prefer-array-literal rule (#862)
* Use only tslint --test for prefer-array-literal rule

* Restrict only global objects with Array (fixes #856)

* Add allow-single-argument option and check argument types (fixes #822)

* Update docs and metadata for prefer-array-literal rule

* Apply suggestions related to wording in README.md

Co-Authored-By: Josh Goldberg <joshuakgoldberg@outlook.com>

* Change new option name to allow-size-argument

* Use Set for restricted namespaces. Add `self` to restrictions

* Fix error message for incorrect size argument

* Handle array spread in argument position

* Drop node text from all error messages

* Handle potential exceptions from TS

* Add comment about additional check for SpreadElement
2019-05-18 02:47:02 +03:00
..
allow-size-argument Improve prefer-array-literal rule (#862) 2019-05-18 02:47:02 +03:00
allow-size-argument-typed Improve prefer-array-literal rule (#862) 2019-05-18 02:47:02 +03:00
allow-type-parameters Improve prefer-array-literal rule (#862) 2019-05-18 02:47:02 +03:00
default Improve prefer-array-literal rule (#862) 2019-05-18 02:47:02 +03:00