Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wearhere committed Mar 20, 2017
0 parents commit 4b086de
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 Mixmax, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Mixmax JavaScript Style Guide

## Installing

```sh
npm install eslint-config-mixmax --save-dev
```

## Usage

In a directory containing Node.js code, create an `.eslintrc.json` file containing:

```json
{
"extends": "mixmax/node"
}
```

This configuration assumes that you're using Node 7.6.0 or higher.

A configuration for browser code is forthcoming.

If you want you can extend the base configuration directly (`"extends": "mixmax"`) but you shouldn't
need to since the Node and browser configurations already extend that.

## Philosophy

At v0.1.0, this style guide is starting off very minimal—pretty much just ESLint's recommended
rules (the checkmarked rules [here](http://eslint.org/docs/rules)).

We may wish to adopt a more comprehensive / style-oriented spec like [Airbnb’s](https://github.com/airbnb/javascript),
since team members write JS, especially ES6, in slightly different ways; but in the interest of not
immediately breaking our projects I’ve deferred this till later.
16 changes: 16 additions & 0 deletions eslint-config-mixmax.sublime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"folders": [{
"path": ".",
"folder_exclude_patterns": [
"node_modules"
],
}],
"settings": {
"tab_size": 2,
"ensure_newline_at_eof_on_save": true,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"detect_indentation": false,
"rulers": [100]
}
}
1 change: 1 addition & 0 deletions eslint-config-mixmax.sublime-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
env: {
es6: true
},
extends: 'eslint:recommended',
rules: {
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'no-use-before-define': ['error', 'nofunc']
}
};
9 changes: 9 additions & 0 deletions node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
parserOptions: {
ecmaVersion: 2017 // Node 7.
},
env: {
node: true
},
extends: 'mixmax'
}
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "eslint-config-mixmax",
"version": "0.1.0",
"description": "Mixmax's WIP style guide for JavaScript.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mixmaxhq/eslint-config-mixmax.git"
},
"keywords": [
"style",
"guide",
"lint",
"mixmax",
"es6",
"es2015",
"es8",
"es2017"
],
"author": "Jeff Wear <[email protected]> (https://mixmax.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/mixmaxhq/eslint-config-mixmax/issues"
},
"homepage": "https://github.com/mixmaxhq/eslint-config-mixmax#readme"
}

0 comments on commit 4b086de

Please sign in to comment.