Skip to content

Best-practices and coding conventions for the CoffeeScript programming language

Notifications You must be signed in to change notification settings

ttab/coffeescript-style-guide

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#CoffeeScript Style Guide

This Style Guide is based on this one

Custom linter rules

Differences from the default CoffeeScript linter are

{
  "arrow_spacing": {
    "level": "warn"
  },
  "no_trailing_whitespace": {
    "level": "warn"
  },
  "max_line_length": {
    "value": 120,
    "level": "warn"
  },
  "indentation": {
    "value": 4
  },
  "colon_assignment_spacing": {
    level: "ignore",
  },
  "no_empty_param_list": {
    "level": "warn"
  },
  "space_operators": {
    "level": "warn"
  }
}

How to use in a project

Add as a dev dependency

npm i --dev @ttab/coffeescript-style

or

yarn add -D @ttab/coffeescript-style

Add a local coffeelint.json file in the root folder on your project that extends this linter config

{
    "extends": "@ttab/coffeescript-style"
}

Add a script in package.json

"scripts": {
    "lint": "coffeelint ./**/*.coffee",
}

Run the linter with

npm run lint

or

yarn lint

About

Best-practices and coding conventions for the CoffeeScript programming language

Resources

Stars

Watchers

Forks

Packages

No packages published