Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !44

Relax a couple lint rules

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/lacker/tweaklint into master Jul 20, 2016
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: lacker

I tried applying these lint rules to a couple random projects I had lying around and ran into some frustrations. I suggest these two tweaks.

  1. no-new is now a warning instead of an error. Sometimes you have an API where all you need to do is create an object; you don't need to do anything else with it. You can usually get around the lint rule by doing something trivial, but there's no reason not to run the resulting code.
  2. no-unused-vars is now a warning instead of an error, and doesn't apply to function arguments. There's plenty of times when you have a variable and haven't used it yet but you want to see the intermediate results. Also, there are cases when it's weird to omit unused function arguments. Like when you are creating a promise with new Promise(resolve, reject), it is odd to omit reject. Or if you are using an API based on inheritance, it is odd to omit args from the signature that you don't use.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/lacker/tweaklint