-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kent C. Dodds
committed
Sep 4, 2015
0 parents
commit d79269d
Showing
13 changed files
with
402 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": "kentcdodds", | ||
"rules": { | ||
"quotes": [2, "double"], // because I may want to move this config to an .eslintrc eventually... | ||
"quote-props": 0, // same reason... | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.log | ||
*.DS_Store | ||
|
||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.idea | ||
node_modules | ||
coverage | ||
local-examples | ||
demo | ||
.editorconfig | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
karma.conf.js | ||
webpack.config.js | ||
other |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
sudo: false | ||
language: node_js | ||
cache: | ||
directories: | ||
- node_modules | ||
notifications: | ||
email: false | ||
node_js: | ||
- iojs | ||
before_install: | ||
- npm i -g npm@^2.0.0 | ||
before_script: | ||
- npm prune | ||
script: | ||
- npm t | ||
after_success: | ||
- npm run semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. | ||
|
||
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. | ||
|
||
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.1.0, available at [http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Contributing | ||
|
||
To contribute to the project, please follow these steps: | ||
|
||
1. Get approval for the idea by filing an issue and talking with me about the changes. | ||
2. Fork the repo | ||
3. Make a branch for your change | ||
4. Run `npm install` | ||
5. Run `npm start` | ||
6. Make your changes | ||
7. Run `git add -A` to add your changes | ||
8. Run `npm run commit` (**Do not** use `git commit`) | ||
9. Push your changes with `git push` | ||
10. Create the Pull Request | ||
11. Get merged and celebrate! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
The MIT License (MIT) | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# eslint-config-kentcdodds | ||
|
||
[![travis build](https://img.shields.io/travis/kentcdodds/eslint-config-kentcdodds.svg?style=flat-square)](https://travis-ci.org/kentcdodds/eslint-config-kentcdodds) | ||
[![version](https://img.shields.io/npm/v/eslint-config-kentcdodds.svg?style=flat-square)](http://npm.im/eslint-config-kentcdodds) | ||
[![downloads](https://img.shields.io/npm/dm/eslint-config-kentcdodds.svg?style=flat-square)](http://npm-stat.com/charts.html?package=eslint-config-kentcdodds&from=2015-08-01) | ||
[![MIT License](https://img.shields.io/npm/l/eslint-config-kentcdodds.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) | ||
|
||
|
||
ESLint rules for all of my personal projects. Feel free to use these conventions :-) | ||
|
||
|
||
## Usage | ||
|
||
Install the conventions by running: | ||
|
||
``` | ||
npm install --save-dev eslint-config-kentcdodds | ||
``` | ||
|
||
Then add the extends to your `.eslintrc`: | ||
|
||
```javascript | ||
{ | ||
"extends": "kentcdodds", | ||
"rules": { | ||
// your overrides | ||
} | ||
} | ||
``` | ||
|
||
This config lib also includes a `test` and a `test-angular` config: | ||
|
||
```javascript | ||
{ | ||
"extends": "kentcdodds/test" | ||
} | ||
``` | ||
|
||
```javascript | ||
{ | ||
"extends": "kentcdodds/test-angular" | ||
} | ||
``` | ||
|
||
## LICENSE | ||
|
||
MIT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"rules": { | ||
"quotes": [2, "single", "avoid-escape"], | ||
"no-use-before-define": [2, "nofunc"], | ||
"no-unused-expressions": 0, | ||
"strict": 0, | ||
"new-cap": [2, { | ||
"newIsCap": true, | ||
"capIsNew": true | ||
}], | ||
"comma-dangle": 0, | ||
"max-statements": [2, 30], | ||
"max-len": [2, 120, 2], | ||
"max-depth": [2, 4], | ||
"max-nested-callbacks": [2, 5], | ||
"indent": [2, 2, {"SwitchCase": 1}], | ||
"brace-style": [2, "1tbs"], | ||
"spaced-line-comment": 0, | ||
|
||
// possible errors | ||
"space-infix-ops": 2, | ||
"no-cond-assign": 2, | ||
"no-console": 2, | ||
"no-constant-condition": 2, | ||
"no-control-regex": 2, | ||
"no-process-env": 0, | ||
"no-debugger": 2, | ||
"no-dupe-args": 2, | ||
"no-dupe-keys": 2, | ||
"no-duplicate-case": 2, | ||
"no-empty-character-class": 2, | ||
"no-empty": 2, | ||
"no-ex-assign": 2, | ||
"no-extra-boolean-cast": 0, | ||
"no-extra-parens": 0, | ||
"no-extra-semi": 2, | ||
"no-func-assign": 2, | ||
"no-inner-declarations": 2, | ||
"no-invalid-regexp": 2, | ||
"no-irregular-whitespace": 2, | ||
"no-negated-in-lhs": 2, | ||
"no-obj-calls": 2, | ||
"no-regex-spaces": 2, | ||
"no-reserved-keys": 0, | ||
"no-sparse-arrays": 2, | ||
"no-unreachable": 2, | ||
"use-isnan": 2, | ||
"valid-jsdoc": [2, {"requireReturn": false}], | ||
"valid-typeof": 2, | ||
|
||
// best practices | ||
"accessor-pairs": 2, | ||
"no-var": 2, | ||
"prefer-const": 2, | ||
"complexity": [2, 5], | ||
"consistent-return": 2, | ||
"curly": 2, | ||
"default-case": 2, | ||
"dot-notation": 2, | ||
"dot-location": [2, "property"], | ||
"eqeqeq": 2, | ||
"guard-for-in": 2, | ||
"no-alert": 2, | ||
"no-caller": 2, | ||
"no-div-regex": 2, | ||
"no-else-return": 0, | ||
"no-labels": 2, | ||
"no-eq-null": 2, | ||
"no-eval": 2, | ||
"no-extend-native": 2, | ||
"no-extra-bind": 2, | ||
"no-fallthrough": 2, | ||
"no-floating-decimal": 2, | ||
"no-implied-eval": 2, | ||
"no-iterator": 2, | ||
"no-lone-blocks": 2, | ||
"no-loop-func": 2, | ||
"no-multi-spaces": 2, | ||
"no-multi-str": 2, | ||
"no-native-reassign": 2, | ||
"no-new-func": 2, | ||
"no-new-wrappers": 2, | ||
"no-new": 2, | ||
"no-octal-escape": 2, | ||
"no-octal": 2, | ||
"no-param-reassign": 0, | ||
"no-proto": 2, | ||
"no-redeclare": 2, | ||
"no-return-assign": 2, | ||
"no-script-url": 2, | ||
"no-self-compare": 2, | ||
"no-sequences": 2, | ||
"no-throw-literal": 2, | ||
"no-void": 2, | ||
"no-warning-comments": [2, {"terms": ["fixme"], "location": "anywhere"}], | ||
"no-with": 0, | ||
"radix": 2, | ||
"vars-on-top": 2, | ||
"wrap-iife": [2, "inside"], | ||
"yoda": 2, | ||
|
||
// variables | ||
"no-catch-shadow": 2, | ||
"no-delete-var": 2, | ||
"no-shadow-restricted-names": 2, | ||
"no-shadow": 2, | ||
"no-undef-init": 2, | ||
"no-undef": 2, | ||
"no-undefined": 0, | ||
"no-unused-vars": [2, {"args": "after-used"}], | ||
|
||
// stylistic | ||
"array-bracket-spacing": [2, "never"], | ||
"camelcase": [2, {"properties": "always"}], | ||
"comma-spacing": [2, {"before": false, "after": true}], | ||
"comma-style": [2, "last"], | ||
"computed-property-spacing": [2, "never"], | ||
"consistent-this": 0, // Too many use-cases for reassigning "this" to different values | ||
"eol-last": 2, | ||
"func-names": 2, | ||
"func-style": [2, "declaration"], | ||
"key-spacing": [2, {"beforeColon": false, "afterColon": true}], | ||
"lines-around-comment": 0, | ||
"linebreak-style": [2, "unix"], | ||
"new-parens": 2, | ||
"newline-after-var": 0, | ||
"no-array-constructor": 2, | ||
"no-continue": 2, | ||
"no-inline-comments": 0, | ||
"no-lonely-if": 2, | ||
"no-multiple-empty-lines": 0, | ||
"no-nested-ternary": 2, | ||
"no-new-object": 2, | ||
"no-spaced-func": 2, | ||
"no-ternary": 0, | ||
"no-trailing-spaces": [2, {"skipBlankLines": true}], | ||
"no-underscore-dangle": 0, | ||
"no-unneeded-ternary": 2, | ||
"object-curly-spacing": [2, "never"], | ||
"one-var": [2, {"uninitialized": "always", "initialized": "never"}], | ||
"operator-assignment": 0, // readability on a case-by-case basis | ||
"operator-linebreak": [2, "after"], | ||
"padded-blocks": 0, | ||
"quote-props": [2, "as-needed"], | ||
"semi-spacing": [2, {"before": false, "after": true}], | ||
"semi": [2, "always"], | ||
"sort-vars": 0, | ||
"space-after-keywords": [2, "always"], | ||
"space-before-blocks": [2, "always"], | ||
"space-before-function-paren": [2, "never"], | ||
"space-in-parens": [2, "never"], | ||
"space-return-throw-case": 2, | ||
"space-unary-ops": [2, {"words": true, "nonwords": false}], | ||
"spaced-comment": 0, | ||
"wrap-regex": 0, | ||
"constructor-super": 2, | ||
"generator-star-spacing": [2, {"before": false, "after": true}], | ||
"no-this-before-super": 2, | ||
"object-shorthand": [2, "properties"], // methods are optional so you can specify a name if you want | ||
"max-params": [2, 5], | ||
"no-bitwise": 2, | ||
"no-plusplus": 0 | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"ecmaFeatures": { | ||
"modules": true | ||
}, | ||
"globals": { | ||
} | ||
}; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"name": "eslint-config-kentcdodds", | ||
"version": "0.0.0-semantically-released", | ||
"description": "ESLint rules according to kentcdodds' personal preference", | ||
"main": "index.js", | ||
"scripts": { | ||
"commit": "git-cz", | ||
"test": "eslint index.js test-angular.js test.js", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kentcdodds/eslint-config-kentcdodds.git" | ||
}, | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig", | ||
"config", | ||
"kentcdodds", | ||
"javascript", | ||
"styleguide" | ||
], | ||
"author": "Kent C. Dodds <[email protected]> (http://kentcdodds.com/)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/kentcdodds/eslint-config-kentcdodds/issues" | ||
}, | ||
"homepage": "https://github.com/kentcdodds/eslint-config-kentcdodds#readme", | ||
"peerDependencies": { | ||
"eslint": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"babel-eslint": "^4.1.1", | ||
"eslint-plugin-mocha": "~0.5.1" | ||
}, | ||
"devDependencies": { | ||
"commitizen": "1.0.4", | ||
"cz-conventional-changelog": "1.1.0", | ||
"eslint": "1.3.1", | ||
"ghooks": "0.3.2", | ||
"semantic-release": "^4.3.4", | ||
"validate-commit-msg": "1.0.0" | ||
}, | ||
"czConfig": { | ||
"path": "node_modules/cz-conventional-changelog" | ||
}, | ||
"config": { | ||
"ghooks": { | ||
"commit-msg": "./node_modules/.bin/validate-commit-msg && npm test" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
"extends": "kentcdodds/test", | ||
"globals": { | ||
// angular-mocks | ||
"inject": false, | ||
// protractor | ||
"element": false, | ||
"by": false, | ||
"browser": false, | ||
"protractor": false | ||
} | ||
}; |
Oops, something went wrong.