eslint-config-ggc v1.3.6
eslint-config-ggc
ESLint shareable config based on Green Global's JavaScript Style Guide
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-ggcThen, 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)
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago