Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Added prefer-readonly rule with fixes #2896

Merged
merged 22 commits into from
Nov 28, 2017
Merged

Added prefer-readonly rule with fixes #2896

merged 22 commits into from
Nov 28, 2017

Commits on Jun 7, 2017

  1. Added prefer-readonly rule with fixes

    Deceptively simple... I look forward to contributors finding new and exciting test cases.
    Josh Goldberg committed Jun 7, 2017
    Configuration menu
    Copy the full SHA
    267ad63 View commit details
    Browse the repository at this point in the history
  2. Added member variable functions as test cases

    Josh Goldberg committed Jun 7, 2017
    Configuration menu
    Copy the full SHA
    c88cdb2 View commit details
    Browse the repository at this point in the history
  3. Removed unused scope member

    Josh Goldberg committed Jun 7, 2017
    Configuration menu
    Copy the full SHA
    f7abbe0 View commit details
    Browse the repository at this point in the history
  4. Added prefer-readonly to tslint:all

    Josh Goldberg committed Jun 7, 2017
    Configuration menu
    Copy the full SHA
    e37e2e3 View commit details
    Browse the repository at this point in the history
  5. Fixed internal source violations of prefer-readonly

    Josh Goldberg committed Jun 7, 2017
    Configuration menu
    Copy the full SHA
    0c1fb66 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2017

  1. Type checker and more intelligently handled class scope, corner cases

    As suggested:
    * This now uses the type checker to see if types match
    * Keeps a stackable state for whether the scope is in a constructor (to deal with nested functions)
    * Adds a few more corner cases, such as parameter declarations, --/++ expressions, and overlapping classes
    
    The variable scoping logic was bleeding pretty heavily into the walker, so I moved it into its own class. Much clearer separation of concerns now.
    Josh Goldberg committed Jun 9, 2017
    Configuration menu
    Copy the full SHA
    2da094e View commit details
    Browse the repository at this point in the history
  2. Added missing deletion tests

    Josh Goldberg committed Jun 9, 2017
    Configuration menu
    Copy the full SHA
    efea6ec View commit details
    Browse the repository at this point in the history
  3. Fixed parameter propertie by checking in handleConstructor

    Also added a test for IIFEs used to set them.
    Josh Goldberg committed Jun 9, 2017
    Configuration menu
    Copy the full SHA
    569ac5a View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2017

  1. Mostly addressed ajafff's feedback

    * Split variableModifications into two Sets
    * Corrected computed property names
    * Corrected logic around constructor scope depths
    * Stopped recursing on nodes with declare keywords
    * ++/-- unary expressions only as modifiers
    Josh Goldberg committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    f5fdb8e View commit details
    Browse the repository at this point in the history
  2. Went back to isModfier

    CircleCI is failing.
    Josh Goldberg committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    42a336d View commit details
    Browse the repository at this point in the history
  3. Fixed OUTSIDE_CONSTRUCTOR settings

    Josh Goldberg committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    ae96afb View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2017

  1. Used utils.isFunctionScopeBoundary to better handle them

    Also brought in tsutils@2.4.0. That should fix any caching shenanigans.
    Josh Goldberg committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    a8ea477 View commit details
    Browse the repository at this point in the history
  2. Cleaned ++/-- to be within property access checks

    Josh Goldberg committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    69543a4 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2017

  1. Merge branch 'master' of https://github.com/palantir/tslint into pref…

    …er-readonly
    Josh Goldberg committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    b68d4cf View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2017

  1. Feedback: rationale, this.scope!, isModifier update

    Josh Goldberg committed Jun 18, 2017
    Configuration menu
    Copy the full SHA
    4dd52ce View commit details
    Browse the repository at this point in the history
  2. Fixed new build errors

    Josh Goldberg committed Jun 18, 2017
    Configuration menu
    Copy the full SHA
    b0c2b11 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2017

  1. Moved classScope and typeUtils, as per feedback

    Josh Goldberg committed Jun 19, 2017
    Configuration menu
    Copy the full SHA
    1f2e78d View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2017

  1. Merge branch 'master' into prefer-readonly

    # Conflicts:
    #	package.json
    #	src/language/walker/blockScopeAwareRuleWalker.ts
    Josh Goldberg committed Sep 12, 2017
    Configuration menu
    Copy the full SHA
    946b52e View commit details
    Browse the repository at this point in the history
  2. Made program not readonly

    Josh Goldberg committed Sep 12, 2017
    Configuration menu
    Copy the full SHA
    a20e2c8 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2017

  1. Merge branch 'master' into prefer-readonly

    # Conflicts:
    #	src/language/rule/rule.ts
    #	src/rules/noReferenceImportRule.ts
    Josh Goldberg committed Nov 4, 2017
    Configuration menu
    Copy the full SHA
    fbdda51 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2017

  1. Configuration menu
    Copy the full SHA
    8efa5bc View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2017

  1. Merge branch 'master' into prefer-readonly

    # Conflicts:
    #	src/rules/completedDocsRule.ts
    Josh Goldberg committed Nov 24, 2017
    Configuration menu
    Copy the full SHA
    6918b76 View commit details
    Browse the repository at this point in the history