forked from palantir/tslint
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Tslint indent #1
Merged
yubaoquan
merged 58 commits into
yubaoquan:feature-indent-size-check
from
erikkemperman:tslint-indent
May 9, 2018
Merged
Tslint indent #1
yubaoquan
merged 58 commits into
yubaoquan:feature-indent-size-check
from
erikkemperman:tslint-indent
May 9, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[no-log] This doesn't change our public API.
[bugfix] `no-unsafe-any` allows spreading an `any`-value into an object
[bugfix] `callable-types` adds parentheses when fixing a type literal inside an array type
The support for the `noAssert` argument dropped in the upcoming Node.js version 10.x and the argument should be removed therefore.
JSON cannot have dangling comma
The current documentation of the cli flag `--project` is a little confusing as to which the path of a file or the path of a directory can be specified. As both are valid options, updating the documentation to make it clear that either the path to a `tsconfig.json` file or the path to a directory containing a `tsconfig.json` file can be specified.
Added fix for text issue
* Added a couple extra docs lines to align * Added a couple extra docs lines to arrow-return-shorthand * Added a couple extra docs lines to await-promise * Added a couple extra docs lines to binary-expression-operand-order * Added a couple extra docs to class-name * Added a couple extra docs to completed-docs * Added another doc line to cyclomatic-complexity * Switch link to https in eofline * Added a couple extra docs to for-in * Added a couple extra docs to member-access * Added a couple extra docs to member-ordering * Added a couple extra docs to no-any * Added a couple extra docs to no-boolean-literal-compare * Added a couple extra docs to no-consecutive-blank-lines * Added a couple extra docs to no-dynamic-delete * Added a couple extra docs to no-floating-promises * Added a couple extra docs to no-inferred-empty-object-type * Added a brief rationale to no-invalid-template-strings-rule * Typo correction on no-magic-numbers * Added a couple extra docs to no-misused-new * Added a couple extra docs to no-non-null-assertion * Added a couple extra docs to no-null-keyword * Added a couple extra docs to no-parameter-properties * Added a couple extra docs to no-shadowed-variable * Added a couple extra docs to no-string-throw * Added a couple extra docs to no-this-assignment * Added a couple extra docs to no-unbound-method * Added a couple extra docs to no-unnecessary-callback-wrapper * Added a couple extra docs to no-unnecessary-initializer * Added a couple extra docs to no-unsafe-any * Added a couple extra docs to no-unused-variable * Added a couple extra docs to no-var-keyword * Added a couple extra docs to no-var-requires * Added a couple extra docs to no-void-expression * Added a couple extra docs to number-literal-format * Missing dedent in no-non-null-assertion
* Build tslint with TypeScript 2.7.2. Updates the package.json, fixes some compiler issues where some typescript APIs changed, and makes 2 rules work under 2.7.2. * Fixes from code review. Fixed a lint issue (' => "). Actually checked for undefined, instead of just asserting.
…k. (palantir#3807) This is useful if you only want your function and method declarations to warn, or in other words, one doesn't want each arrow function that is passed to Promise#then() or Promise#catch() to be async.
Changed to: "All imports on this line are unused"
The example uses: ``` class [a-zA-Z] implements ``` but this only matches a class that has a single character as name. Even if it is an example, the rule should accept more than one character for the class name. I struggled with this ignore pattern in a project, because I didn't read the pattern itself completely. Therefore I want to give this feedback, such that other people don't have to search for the reason of a failing rule, like me.
…tadata (palantir#3602) * codeExample support init implementation * dedent/markdown errors need revisting * updates to new code example scheme as per ajafff * reverts prettier style updates in curly * curly docs he -> they * ICodeExample config type any -> string * Code example blocks now color-coded according to pass/fail (grn/red) * updates to buildDocs * gemfile.lock??; removes unnecessary html/scss * removes site dist * moving code examples to dedicated dir to avoid bloat in rule files * removing _site dir
* fix non-no-unused-variable tests * Fix no-unused-variables tests and modify logic in noUnusedVariableRule for TS2.8 support Logic had to be modified because starting from TS2.8, when all imports in an import node are not used, TS emits only 1 diagnostic object for the whole line as opposed to the previous behavior of outputting a diagnostic with kind == 6192 (UnusedKind.VARIABLE_OR_PARAMETER) for every unused import. * fix lint issue * hack/fix check-parameters test for 2.9-dev * add builds for ts 2.7 and 2.8 * fix tests that broke from diagnosis codes changing in 2.9
It feels self-evident that `lint:global` as a task would lint everything with the global TSLint install.
* [new-fixer]: Add space before comment message fixer * Add space-before-comment test
* Added rule+file-specific error messages to rule crashes It's not clear where tests for this should live. Would you like me to add some, and if so where? * Added endline; no more unnecessary duplication
This adds documentation example to the deprecation rule.
* [docs] no-string-throw: add missing examples. * [docs] no-string-throw: examples for rationale. * Code example section for no-string-throw.
Reading a property with square brackets, though rare, should be allowed because it won't be effected by an unbound this.
- Fixes building of master - Add escaping to backticks introduced in palantir#3823
* prefer-while rule Implements prefer-while rule in place of a for loop without an initializer and incrementer * renamed failure object creation method * fix json test file indentatons * Address review comments - Use isForStatement from tsutils - Update failure string to be more descriptive - Updated test messages * remove uneccessary type assertion - assertion now uneccessary with using isForStatement from tsutils * Add rationale field to prefer-while rule metadata * Use 'let' instead of 'const' in test * Update rule description & failure string - Updated the description and failure string of prefer-while - Updated tests accordingly * Coalesce test cases - Combine test cases for 'bad' for loops and case for 'good' for loops - Remove unneeded files - Add comments to test cases * Add additional test cases - Added test case with incrmentor in body of loop - Added test case with += incrementor * Add code examples - Added code examples for prefer-while rule
…#3729) * Improve "no valid rules" error message to include file type * Lint
* Excluded native JSX elements from no-unsafe-any * Lint fix: double-apostrophe Interesting how TypeScript auto-added single-apostrophes... * ...almost working.. * Split no-unsafe-any into separate tests * Added test cases for fragments * Added case for TS2.1 and fragments
* Prepare release 5.10.0
As you can see in the pr, the maintainer seems not interested in it. Many times after I commit code, they will delay a very long time to review it. So now I give up this pr. You can commit your code in this branch if you like. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@yubaoquan In case you want to update your PR here: