eslint-config-onelint
Advanced tools
Comparing version 1.2.0 to 2.0.0
@@ -22,3 +22,3 @@ Blocks should be braced like this: | ||
```output | ||
Line 17, column 6: Closing curly brace does not appear on the same line as the subsequent block. | ||
Line 16, column 1: Closing curly brace does not appear on the same line as the subsequent block. | ||
``` | ||
@@ -37,5 +37,5 @@ | ||
```output | ||
Line 26, column 1: Opening curly brace does not appear on the same line as controlling statement. | ||
Line 26, column 1: Opening curly brace does not appear on the same line as controlling statement. | ||
Line 31, column 1: Closing curly brace does not appear on the same line as the subsequent block. | ||
Line 27, column 1: Opening curly brace does not appear on the same line as controlling statement. | ||
Line 29, column 1: Closing curly brace does not appear on the same line as the subsequent block. | ||
Line 31, column 1: Opening curly brace does not appear on the same line as controlling statement. | ||
``` | ||
@@ -42,0 +42,0 @@ |
@@ -12,3 +12,3 @@ Any file must have a new line at the end of it. | ||
```output | ||
Line 9, column 2: Newline required at end of file but not found. | ||
Line 9, column 23: Newline required at end of file but not found. | ||
``` | ||
@@ -15,0 +15,0 @@ |
@@ -18,6 +18,7 @@ You must use 4 spaces for indentation. | ||
```output | ||
Line 13, column 3: Expected indentation of 4 space characters but found 2. | ||
Line 13, column 3: Expected indentation of 4 spaces but found 2. | ||
``` | ||
```js | ||
/* eslint no-unused-vars: 0 */ | ||
var foo = 'foo'; | ||
@@ -38,2 +39,3 @@ var num = 0; | ||
```js | ||
/* eslint no-unused-vars: 0 */ | ||
var foo = 'foo'; | ||
@@ -54,10 +56,10 @@ var num = 0; | ||
```output | ||
Line 40, column 5: Expected indentation of 0 space characters but found 4. | ||
Line 41, column 9: Expected indentation of 4 space characters but found 8. | ||
Line 42, column 9: Expected indentation of 4 space characters but found 8. | ||
Line 43, column 5: Expected indentation of 0 space characters but found 4. | ||
Line 44, column 9: Expected indentation of 4 space characters but found 8. | ||
Line 45, column 9: Expected indentation of 4 space characters but found 8. | ||
Line 46, column 5: Expected indentation of 0 space characters but found 4. | ||
Line 47, column 9: Expected indentation of 4 space characters but found 8. | ||
Line 42, column 5: Expected indentation of 0 spaces but found 4. | ||
Line 43, column 9: Expected indentation of 4 spaces but found 8. | ||
Line 44, column 9: Expected indentation of 4 spaces but found 8. | ||
Line 45, column 5: Expected indentation of 0 spaces but found 4. | ||
Line 46, column 9: Expected indentation of 4 spaces but found 8. | ||
Line 47, column 9: Expected indentation of 4 spaces but found 8. | ||
Line 48, column 5: Expected indentation of 0 spaces but found 4. | ||
Line 49, column 9: Expected indentation of 4 spaces but found 8. | ||
``` | ||
@@ -77,3 +79,3 @@ | ||
```output | ||
Line 70, column 2: Expected indentation of 4 space characters but found 0. | ||
Line 72, column 2: Expected indentation of 4 spaces but found 1 tab. | ||
``` |
You should avoid using `arguments.caller` and `arguments.callee`. | ||
```js | ||
/* eslint no-unused-vars: 0 */ | ||
function foo() { | ||
@@ -11,4 +12,4 @@ var calleer = arguments.callee; | ||
```output | ||
Line 5, column 19: Avoid arguments.callee. | ||
Line 6, column 16: Avoid arguments.caller. | ||
Line 6, column 19: Avoid arguments.callee. | ||
Line 7, column 16: Avoid arguments.caller. | ||
``` |
@@ -5,2 +5,3 @@ Do not tolerate assignments inside if, for & while. Usually conditions & loops | ||
```js | ||
/* eslint no-unused-vars: 0 */ | ||
var foo = 'bar'; | ||
@@ -12,3 +13,3 @@ if (foo = 'baz') { | ||
```output | ||
Line 6, column 5: Expected a conditional expression and instead saw an assignment. | ||
Line 7, column 5: Expected a conditional expression and instead saw an assignment. | ||
``` | ||
@@ -29,3 +30,3 @@ | ||
```output | ||
Line 21, column 25: Expected a conditional expression and instead saw an assignment. | ||
Line 22, column 25: Expected a conditional expression and instead saw an assignment. | ||
``` | ||
@@ -32,0 +33,0 @@ |
@@ -12,3 +12,3 @@ In JavaScript, it's possible to redeclare the same variable name using `var`. | ||
```output | ||
Line 7, column 5: 'a' is already defined | ||
Line 7, column 5: 'a' is already defined. | ||
``` |
@@ -7,5 +7,14 @@ Any unused variables will trigger a warning. | ||
```output | ||
Line 4, column 5: 'foo' is defined but never used | ||
Line 4, column 5: 'foo' is assigned a value but never used. | ||
``` | ||
Any assigned but unused variables will also trigger a warning. | ||
```js | ||
var foo = 'foo'; | ||
``` | ||
```output | ||
Line 13, column 5: 'foo' is assigned a value but never used. | ||
``` | ||
But it should not complain about unused function parameters: | ||
@@ -12,0 +21,0 @@ |
@@ -32,3 +32,3 @@ Object properties should be spread across different lines: | ||
```output | ||
Line 26, column 17: Object properties must go on a new line if they aren't all on the same line | ||
Line 26, column 17: Object properties must go on a new line if they aren't all on the same line. | ||
``` |
Onelint requires you to use semicolons. | ||
```js | ||
/* eslint no-unused-vars: 0 */ | ||
var foo = 'bar'; | ||
@@ -11,2 +12,3 @@ foo += 'bar'; | ||
```js | ||
/* eslint no-unused-vars: 0 */ | ||
var foo = 'bar'; | ||
@@ -17,3 +19,3 @@ foo += 'foo' | ||
```output | ||
Line 12, column 13: Missing semicolon. | ||
Line 14, column 13: Missing semicolon. | ||
``` |
@@ -24,2 +24,3 @@ { | ||
"eqeqeq": [2], | ||
"handle-callback-err": [2], | ||
"indent": [2, 4], | ||
@@ -50,2 +51,3 @@ "key-spacing": [2, { "beforeColon": false, "afterColon": true }], | ||
"space-unary-ops": [2], | ||
"quotes": [2, "single", { "avoidEscape": true }], | ||
"wrap-iife": [2, "any"] | ||
@@ -52,0 +54,0 @@ }, |
{ | ||
"name": "eslint-config-onelint", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "eslint configuration for one.com code style", | ||
@@ -26,6 +26,6 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"eslint": "^2.10.0 || ^3" | ||
"eslint": "^3" | ||
}, | ||
"devDependencies": { | ||
"eslint": "2.13.1", | ||
"eslint": "3.14.0", | ||
"eslint-markdown-test": "1.1.0", | ||
@@ -32,0 +32,0 @@ "mocha": "2.3.4" |
@@ -11,2 +11,10 @@ # onelint eslint configuration | ||
## Supported Node.js versions | ||
As of eslint version 3 node versions prior to 4.0.0 are no longer supported. | ||
The [`v1`](https://github.com/One-com/eslint-config-onelint/tree/v1) branch | ||
of this package still supports eslint v2. | ||
Later branches require eslint 3. | ||
## Usage | ||
@@ -13,0 +21,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30318
51
72
137