SlideShare a Scribd company logo
JSCS  Project wise JS Styling
(No header)
Problem   • Different programmmers  • Different coding styles  • Different naming conventions  • Unstructured code
Result   • Incomprehensible code  • Non-maintainable  • Mess
Code Reviewer!
Solution?
JSCS  JavaScript code styling
How to start...
Create new project   • npm init  • Install Grunt  • npm install --save-dev grunt
Install JSCS grunt module   • npm install grunt-jscs --save-dev  • Create Gruntfile.js  • Create new Grunt task
(No header)
JSCS Config  create config.json in project root
Run the Grunt task   • Run "grunt <taskname>"
(No header)
Recode   • Code like Google guys  • And run the Grunt task
Command Line Usage
Install JSCS   • Install JSCS node package  • npm install jscs -g
Run   • jscs src/app.js --config=config.json  • jscs src/app.js --preset=google  • jQuery, Google, Airbnb, Crockford  • MDCS, Wikimedia, Yandex
Options   • --config  • --preset  • --max-errors

  • -verbose  • and more...
(No header)
(No header)
References   • https://www.npmjs.org/package/jscs  • https://github.com/jscs-dev/node-jscs  • https://www.npmjs.org/package/grunt-jscs
Thanks!
JSCS - How to Style your JavaScript Code
JSCS - How to Style your JavaScript Code
JSCS - How to Style your JavaScript Code

More Related Content

What's hot

Basics of VueJS
Basics of VueJSBasics of VueJS
Basics of VueJS
Squash Apps Pvt Ltd
 
NoSQL
NoSQLNoSQL
Js meetup | Yeoman generators
Js meetup | Yeoman generators Js meetup | Yeoman generators
Js meetup | Yeoman generators
Pasindu Perera
 
Unobtrusive Javascript - SD.rb 2007
Unobtrusive Javascript - SD.rb 2007Unobtrusive Javascript - SD.rb 2007
Unobtrusive Javascript - SD.rb 2007
matta
 
BDD using behat
BDD using behatBDD using behat
BDD using behat
Pascal Larocque
 
Javascript fullstasck
Javascript fullstasckJavascript fullstasck
Javascript fullstasck
William Bruno Moraes
 
Xdebug as a Drupal debugging tool
Xdebug as a Drupal debugging toolXdebug as a Drupal debugging tool
Xdebug as a Drupal debugging tool
Vladimir Melnic
 
Spring framework 4.0
Spring framework 4.0Spring framework 4.0
Spring framework 4.0
Diego Pacheco
 
PHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with WebgrindPHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with Webgrind
Andy_Gaskell
 
GulpGruntNPM
GulpGruntNPMGulpGruntNPM
GulpGruntNPM
Ivan Varga
 
Google guice
Google guiceGoogle guice
Google guice
Diego Pacheco
 
Pre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timePre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing time
Jun-ichi Sakamoto
 
Magento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive gridMagento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive grid
Arush Sehgal
 
Node.js
Node.jsNode.js
Typescript - a JS superset
Typescript - a JS supersetTypescript - a JS superset
Typescript - a JS superset
Tyrone Allen
 
Php laravel training
Php laravel trainingPhp laravel training
Php laravel training
Mohammad Hussein Aldweek
 
Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...
Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...
Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...
Jerônimo Medina Madruga
 
WebGL Awesomeness
WebGL AwesomenessWebGL Awesomeness
WebGL Awesomeness
Stephan Seidt
 
RxNetty
RxNettyRxNetty
RxNetty
Diego Pacheco
 
Why WordPress Works
Why WordPress WorksWhy WordPress Works
Why WordPress Works
bekee
 

What's hot (20)

Basics of VueJS
Basics of VueJSBasics of VueJS
Basics of VueJS
 
NoSQL
NoSQLNoSQL
NoSQL
 
Js meetup | Yeoman generators
Js meetup | Yeoman generators Js meetup | Yeoman generators
Js meetup | Yeoman generators
 
Unobtrusive Javascript - SD.rb 2007
Unobtrusive Javascript - SD.rb 2007Unobtrusive Javascript - SD.rb 2007
Unobtrusive Javascript - SD.rb 2007
 
BDD using behat
BDD using behatBDD using behat
BDD using behat
 
Javascript fullstasck
Javascript fullstasckJavascript fullstasck
Javascript fullstasck
 
Xdebug as a Drupal debugging tool
Xdebug as a Drupal debugging toolXdebug as a Drupal debugging tool
Xdebug as a Drupal debugging tool
 
Spring framework 4.0
Spring framework 4.0Spring framework 4.0
Spring framework 4.0
 
PHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with WebgrindPHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with Webgrind
 
GulpGruntNPM
GulpGruntNPMGulpGruntNPM
GulpGruntNPM
 
Google guice
Google guiceGoogle guice
Google guice
 
Pre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timePre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing time
 
Magento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive gridMagento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive grid
 
Node.js
Node.jsNode.js
Node.js
 
Typescript - a JS superset
Typescript - a JS supersetTypescript - a JS superset
Typescript - a JS superset
 
Php laravel training
Php laravel trainingPhp laravel training
Php laravel training
 
Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...
Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...
Need for (web) speed: Uma introdução a otimização de velocidade de sites e We...
 
WebGL Awesomeness
WebGL AwesomenessWebGL Awesomeness
WebGL Awesomeness
 
RxNetty
RxNettyRxNetty
RxNetty
 
Why WordPress Works
Why WordPress WorksWhy WordPress Works
Why WordPress Works
 

Similar to JSCS - How to Style your JavaScript Code

Grunt understanding
Grunt understandingGrunt understanding
Grunt understanding
Khalid Khan
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
Stéphane Bégaudeau
 
Grunt All Day
Grunt All DayGrunt All Day
Grunt All Day
douglasknudsen
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
Stéphane Bégaudeau
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
Pagepro
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
Tejaswita Takawale
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED
Andi Smith
 
GruntJS + Wordpress
GruntJS + WordpressGruntJS + Wordpress
GruntJS + Wordpress
Leonardo Balter
 
Coffeescript installation
Coffeescript installationCoffeescript installation
Coffeescript installation
Indies Services
 
Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!
Dirk Ginader
 
Lightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleLightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with Gradle
Mario-Leander Reimer
 
Lightweight developer provisioning with gradle and seu as-code
Lightweight developer provisioning with gradle and seu as-codeLightweight developer provisioning with gradle and seu as-code
Lightweight developer provisioning with gradle and seu as-code
QAware GmbH
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }
François Michaudon
 
Hitchhiker's guide to the front end development
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development
정윤 김
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
Ye Maw
 
Grunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End TierGrunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End Tier
Erick Brito
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google Cloud
James Heggs
 
Devenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsDevenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.js
Rémy Savard
 
Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)
Future Insights
 
2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build
Daniel Fisher
 

Similar to JSCS - How to Style your JavaScript Code (20)

Grunt understanding
Grunt understandingGrunt understanding
Grunt understanding
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
 
Grunt All Day
Grunt All DayGrunt All Day
Grunt All Day
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED
 
GruntJS + Wordpress
GruntJS + WordpressGruntJS + Wordpress
GruntJS + Wordpress
 
Coffeescript installation
Coffeescript installationCoffeescript installation
Coffeescript installation
 
Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!
 
Lightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleLightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with Gradle
 
Lightweight developer provisioning with gradle and seu as-code
Lightweight developer provisioning with gradle and seu as-codeLightweight developer provisioning with gradle and seu as-code
Lightweight developer provisioning with gradle and seu as-code
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }
 
Hitchhiker's guide to the front end development
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
 
Grunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End TierGrunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End Tier
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google Cloud
 
Devenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsDevenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.js
 
Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)
 
2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build
 

JSCS - How to Style your JavaScript Code