1.3.6 • Published 9 years ago

eslint-config-ggc v1.3.6

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

eslint-config-ggc

ESLint shareable config based on Green Global's JavaScript Style Guide

NPM Build Status

Usage

In order to use this shareable config you have to install the package "eslint-config-ggc" into your project:

npm install --save-dev eslint-config-ggc

Then, create ESLint config file named ".eslintrc.json" (or edit if it exists). The content is short as below:

.eslintrc.json

{
  "extends": "eslint-config-ggc"
}

That's all. It will works.

Sometimes the rules we shared may be not enough for you. Just add more or overwrite them with your own rules by modifying ".eslintrc.json". For example:

.eslintrc.json

{
  "env": {
    "browser": false,
    "node": true,
    "es6": true
  },

  "globals": {
    "goog": true,
    "mocha": true,
    "Polymer": true
  },

  "plugins": [
    "fp"
  ],

  "extends": "eslint-config-ggc",

  rules: {
    "fp/no-arguments": "error",
    "fp/no-class": "error",
    "max-lines": 400,
    "semi": [2, "always"]
  }
}

You will often want to add the commands to package.json, here is a sample:

{
  "name": "sample",
  "version": "0.0.1",
  "description": "A sample for using eslint and eslint-config-ggc",
  "engines": {
    "node": ">= 6.0"
  },
  "scripts": {
    "lint": "eslint ./src"
  },
  "devDependencies": {
    "eslint": "latest",
    "eslint-config-ggc": "latest"
  },
  "license": "MIT"
}

As you can see, we need 2 packages "eslint" and "eslint-config-ggc". After installing them with "npm install", you can check your convention with "npm run lint" command.

References:

License

The MIT License (MIT)

1.3.6

9 years ago

1.3.5

9 years ago

1.3.3

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.22

10 years ago

1.2.21

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago