All Projects → ajafff → Tslint Consistent Codestyle

ajafff / Tslint Consistent Codestyle

Licence: mit
Collection of awesome rules to extend TSLint

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Tslint Consistent Codestyle

Tslint Xo
TSLint shareable config for XO
Stars: ✭ 64 (-68.47%)
Mutual labels:  tslint
Workflow
一个工作流平台
Stars: ✭ 1,888 (+830.05%)
Mutual labels:  tslint
Typestrict
ESLint config focused on maximizing type safety 💪
Stars: ✭ 182 (-10.34%)
Mutual labels:  tslint
Tslint No Circular Imports
TSLint plugin to detect and warn about circular imports
Stars: ✭ 89 (-56.16%)
Mutual labels:  tslint
React Typescript Webpack2 Cssmodules Postcss
Simple Starter Template for React, TypeScript, postCSS, ITCSS, CSS-Modules, Webpack and Live Reloading (React Hot Loader 3)
Stars: ✭ 117 (-42.36%)
Mutual labels:  tslint
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-23.15%)
Mutual labels:  tslint
Coc Tslint Plugin
coc.nvim extension that provides TSLint support using the typescript-tslint-plugin
Stars: ✭ 42 (-79.31%)
Mutual labels:  tslint
Tslint Language Service
TypeScript 2.2.1 plugin for tslint
Stars: ✭ 190 (-6.4%)
Mutual labels:  tslint
Electron React Typescript Webpack Boilerplate
Pre-configured boilerplate for Electron + React + TypeScript + Webpack
Stars: ✭ 146 (-28.08%)
Mutual labels:  tslint
Angular Tslint Rules
Shared TSLint & codelyzer rules to enforce a consistent code style for Angular development
Stars: ✭ 181 (-10.84%)
Mutual labels:  tslint
Typescript Restful Starter
Node.js + ExpressJS + Joi + Typeorm + Typescript + JWT + ES2015 + Clustering + Tslint + Mocha + Chai
Stars: ✭ 97 (-52.22%)
Mutual labels:  tslint
Typescript Eslint
✨ Monorepo for all the tooling which enables ESLint to support TypeScript
Stars: ✭ 10,831 (+5235.47%)
Mutual labels:  tslint
Tslint Angular
Recommended tslint configuration for Angular applications.
Stars: ✭ 159 (-21.67%)
Mutual labels:  tslint
Tslint Config Security
TSLint security rules
Stars: ✭ 71 (-65.02%)
Mutual labels:  tslint
Typescript Webpack React Redux Boilerplate
React and Redux with TypeScript
Stars: ✭ 182 (-10.34%)
Mutual labels:  tslint
Gatsby Starter Typescript Deluxe
A Gatsby starter with TypeScript, Storybook, Styled Components, Framer Motion, Jest, and more.
Stars: ✭ 50 (-75.37%)
Mutual labels:  tslint
React Native Typescript Boilerplate
React Native Typescript starter kit / template (Redux Thunk + React Native Navigation v7 + TSLint)
Stars: ✭ 155 (-23.65%)
Mutual labels:  tslint
Angular2 Express Mongoose Gulp Node Typescript
AngularJS 2 (Updated to 4.2.0) Mean Stack application which uses Angular2, Gulp, Express, Node, MongoDB (Mongoose) with Repository Pattern Business Layer
Stars: ✭ 201 (-0.99%)
Mutual labels:  tslint
Sonartsplugin
SonarQube plugin for TypeScript files
Stars: ✭ 182 (-10.34%)
Mutual labels:  tslint
Express Graphql Typescript Boilerplate
A starter kit for building amazing GraphQL API's with TypeScript and express by @w3tecch
Stars: ✭ 163 (-19.7%)
Mutual labels:  tslint

npm version Downloads CircleCI Coverage Status Join the chat at https://gitter.im/ajafff/tslint-consistent-codestyle Greenkeeper badge

Purpose

The rules in this package can be used to enforce consistent code style.

Usage

Install from npm to your devDependencies (https://www.npmjs.com/package/tslint-consistent-codestyle)

npm install --save-dev tslint-consistent-codestyle

With TSLint

Configure tslint to use tslint-consistent-codestyle:

This package provides an empty configuration preset that just contains the rulesDirectory. That means you can easily use the rules in this package, but don't get any predefined configuration. To use it, just add it to the extends array in your tslint.json:

{
   "extends": ["tslint-consistent-codestyle"]
   "rules": {
     ...
   }
}

As of [email protected] you can also use tslint-consistent-codestyle as rulesDirectory:

{
   "rulesDirectory": ["tslint-consistent-codestyle"]
   "rules": {
     ...
   }
}

Now configure some of the new rules.

With Wotan

This package provides all rules for both TSLint and Wotan.

To use rules from this package, add the following to your .wotanrc.yaml file:

extends:
  - tslint-consistent-codestyle # makes rules from the package available with the 'tcc/' prefix
rules: # now configure the rules you want to use, remember to use the 'tcc/' prefix
  tcc/no-collapsible-if: error
  tcc/no-unused:
    options: 'ignore-parameters'

Rules

Rule Description
const-parameters Declare parameters as const with JsDoc /** @const */
early-exit Recommends to use an early exit instead of a long if block.
ext-curly Enforces where to consistently use curly braces where not strictly necessary.
naming-convention Fine grained configuration to enforce consistent naming for almost everything. E.g. variables, functions, classes, methods, parameters, enums, etc.
no-as-type-assertion Prefer <Type>foo over foo as Type.
no-accessor-recursion Don't use get foo() { return this.foo; }. This is most likely a typo.
no-collapsible-if Identifies nested if statements that can be combined into one.
no-else-after-return Like no-else-return from eslint.
no-return-undefined Just return; instead of return undefined;.
no-static-this Ban the use of this in static methods.
no-unnecessary-else Like no-else-after-return but better.
no-unnecessary-type-annotation Finds type annotations that can safely be removed.
no-unused Find dead code and unused declarations.
no-var-before-return Checks if the returned variable is declared right before the return statement.
object-shorthand-properties-first Shorthand properties should precede regular properties.
parameter-properties Configure how and where to declare parameter properties.
prefer-const-enum Prefer const enum where possible.
prefer-while Prefer a while loop instead of a for loop without initializer and incrementer.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].