0.1.3 • Published 11 years ago

tscop v0.1.3

Weekly downloads
2
License
-
Repository
-
Last release
11 years ago

TS-StyleCop

TS-StyleCop provides value by enforcing a common set of style rules for TypeScript code. TS-StyleCop intend to be a single, consistent set of rules. Developers also will be able to implement their own rules.

Based on C# StyleCop.

Install

npm install -g tscop

Usage

tscop hello.ts

Example

  1. Having the following file (test.ts):
var Myvar = 1;

class class1 { }

class class2 { }

class anotherClass {

    public MyMethodName(): string{
        return null;
    }
}

class Class3 { }
  1. Executing TS-StypeCop to this file:

    tscop test.ts
  2. The command output will be:

npm.io

Build

  1. Install Node if you haven't already (http://nodejs.org/)
  2. At the root folder run npm install
  3. Install grunt cli (http://gruntjs.com/). To do this, run npm install -g grunt-cli
  4. At the root folder run grunt

TS-StyleCop rules

The implemented rules until now are:

  • Naming Rules (SA13*) Rules which enforce naming requirements for members, types, and variables. SA1300: The name of a TypeScript element does not begin with an upper-case letter.* SA1301: The name of a TypeScript element does not begin with an lower-case letter.*

I'm working on porting and adapt all this rules: http://www.stylecop.com/docs/StyleCop%20Rules.html

Roadmap

  • Add unit tests
  • Improving the interface to create rules
  • IMplement a set of rules
  • Refactor the code
  • Create a VisualStudio plugin
  • ...

Creating a custom rule

Pending...

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago