Skip to content

Commit

Permalink
upgrade-to-eslint2
Browse files Browse the repository at this point in the history
* upgrade

* argon es6 fix, edited readme.md

* Version increment to 2.0.0 in package.json
  • Loading branch information
Mikitovics Márk authored and latotty committed Apr 6, 2016
1 parent 458a5bc commit 690cb78
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ Sharable eslint config created and used by CodingSans

## ESLINT Version

This config created for eslint 1.10.*
If you want to use eslint 2+ you must wait, or use a later version of this package.
This config created for eslint 2.7.*

## Installation

```
npm install --save-dev eslint@1.10 eslint-config-codingsans
npm install --save-dev eslint@2.7 eslint-config-codingsans
```

## Usage

Choose a config:

- `codingsans` - Default config, alias for argon.
- `codingsans/argon` - Config created for working with Node 4.2 (Argon).
- `codingsans/argon` - Config created for working with Node 4 (Argon).
- `codingsans/babel` - Config created for babel ES6.
- `codingsans/mochaTestExt` - Config created for mocha test folders (this is an extension config).
- More to come...
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-codingsans",
"version": "1.2.0",
"version": "2.0.0",
"description": "CodingSans Eslint config",
"main": "index.js",
"scripts": {
Expand All @@ -21,6 +21,6 @@
"eslint-sharable-config-generator": "^1.0.1"
},
"peerDependencies": {
"eslint": "^1.10.3"
"eslint": "^2.7.0"
}
}
7 changes: 7 additions & 0 deletions src/components/_babel.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
extends:
- ./es2015/_babelFeatures.yaml
- ./es2015/_commonRules.yaml
## http://eslint.org/docs/user-guide/configuring.html#specifying-environments
## adds all of the es6 global variables.
env:
es6: true

## parses the code with babel
parser: "babel-eslint"

rules:
##############################
Expand Down
5 changes: 5 additions & 0 deletions src/components/_es2015Argon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ extends:
- ./es2015/_argonFeatures.yaml
- ./es2015/_commonRules.yaml

## http://eslint.org/docs/user-guide/configuring.html#specifying-environments
## adds all of the es6 global variables.
env:
es6: true

rules:
##############################
# Strict Mode
Expand Down
4 changes: 4 additions & 0 deletions src/components/_mochaTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ rules:
## https://github.com/eslint/eslint/blob/master/docs/rules/new-cap.md
## Turned off for testing reasons
new-cap: 0
## Forbids lone blocks
## https://github.com/eslint/eslint/blob/master/docs/rules/no-lone-blocks.md
## Turned off for testing reasons
no-lone-blocks: 0
2 changes: 0 additions & 2 deletions src/components/common/_possibleErrors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ rules:
no-unreachable: 2
## isnan should be used for nan compare
use-isnan: 2
## check for valid jsdoc
valid-jsdoc: 2
## require valid typeof compared string like typeof foo === 'string'
valid-typeof: 2
4 changes: 1 addition & 3 deletions src/components/common/_stylisticIssues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ rules:
## put semi-colon
semi: [2, "always"]
# require space after keywords, eg 'for (..)'
space-after-keywords: 2
keyword-spacing: 2
## require space before blocks, eg 'function() {'
space-before-blocks: [2, "always"]
## no space before function, eg. 'function()'
Expand All @@ -79,5 +79,3 @@ rules:
space-in-parens: [2, "never"]
## require spaces operator like var sum = 1 + 1;
space-infix-ops: 2
## require spaces return, throw, case
space-return-throw-case: 2

0 comments on commit 690cb78

Please sign in to comment.