"code quality" Posts

Using Grunt to JSHint and JSCS your JavaScript code.

This is part 2 to my last post, which you’ll want to read first since I’m going to assume some of your gruntfile.js has some necessary settings.

 

Using Grunt to JSHint (Code Quality) and jscs (Code Style checker) your JavaScript code.

 

In this post, I'm going to show you how to get Gruntjs to check your JavaScript Code for quality in Visual Studio 2015.

 

Add this to your package.json file.

 

"grunt-jscs": "latest",
"grunt-contrib-jshint": "latest"

 

This will add JSCS and JSHint to your node_modules folder and let us run our tasks.

 

Add

 

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');

 

to gruntfile.js at the bottom with the rest of your loadNpmTasks

 

Read More

Resharper Magic Tricks

Last week, I gave a presentation at the GSP Developers’ Guild’s monthly meeting where I talked about some of the cool (maybe hidden) things that ReSharper can do for you. In this article I’m going to summarize my talk and give links to where you can get the Custom Live Templates, and Extensions. I realize that this post is lessened by not having some of the visuals (no projector, etc).

 

ReSharper Intro

 

ReSharper can do some really cool things. 

 

ReSharper can bulk fix code style issues like variable names conventions.

 

 

 

Code completion is made easier and code simplification is highlighted.

 

It  can also help with if statement nesting or showing you extra code that can be reduced.

 

New to Resharper 9 is finding references on NuGet. I referenced a type from MomentSharp - a DateTime library that I wrote - but I don’t have it referenced in the project. I can use the light blub or Alt + Enter and “Find this type on nuget.org”.

 

Also new to ReSharper 9 is support for C# 6 features like string interpolation.

Read More


About Me

Hello, I’m Jonathan Peterson (aka Eonasdan)! I’m a web developer and CEO of Paladin Cloudware.

I have over 10 years of experience developing a wide array of web applications and websites. In my free time, I contribute to several open source projects.

As a die-hard developer, you’ll find me programming in my head on the rare occasions when I'm without an Internet connection.

Find me on:

Tags

telerik, MVC, Entity Framework, ReSharper, Tips And Tricks, less, grunt, C#, visual studio, code quality, NuGet, visual studio 2015