Skip to content

Commit

Permalink
Merge pull request #6 from namics/develop
Browse files Browse the repository at this point in the history
v2.2.0
  • Loading branch information
smollweide authored Mar 2, 2017
2 parents 104791b + f23cbe9 commit 3c23a07
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 4 deletions.
42 changes: 42 additions & 0 deletions documentation/es6.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,48 @@ const str = `Hello, ${name}!`;



### [Require jsdoc](http://eslint.org/docs/rules/require-jsdoc)

> do not require jsdoc

✓ Enabled (error)

```javascript

// BAD
/*
class Test {
constructor() {
this.test = '12';
}
}
*/

// GOOD
/**
* @constructor Test
*/
class Test {

/**
* @returns {void}
*/
constructor() {
this.test = '12';
}
}

// OKAY
const testArrow = () => 'testArrow';


```
<br />



### [Require yield](http://eslint.org/docs/rules/require-yield)

> disallow generator functions that do not have yield
Expand Down
18 changes: 18 additions & 0 deletions documentation/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,24 @@ function good() {

&#10003; Enabled (error)

```javascript

// BAD
/*
function test() {
return 'test';
}
*/

// GOOD
/**
* @returns {string} - something
*/
function test() {
return 'test';
}

```
<br />


Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@namics/eslint-config",
"version": "2.1.0",
"version": "2.2.0",
"description": "Default configurations for eslint",
"author": "Simon Mollweide <simon.mollweide@namics.com>",
"license": "MIT",
Expand All @@ -18,7 +18,7 @@
"main": "configurations/es6-browser.js",
"scripts": {
"lint": "npm run lint:js",
"lint:js": "node_modules/.bin/eslint **/*.jsx **/*.js",
"lint:js": "node_modules/.bin/eslint test/**/*.jsx test/**/*.js",
"test": "npm run lint"
},
"keywords": [
Expand All @@ -40,7 +40,7 @@
},
"dependencies": {
"eslint-find-rules": "^1.14.3",
"eslint-plugin-jsx-a11y": "^3.0.1",
"eslint-plugin-react": "^6.7.1"
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0"
}
}
1 change: 1 addition & 0 deletions rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ module.exports = {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
ArrowFunctionExpression: false,
},
}],
// [08.07.2016] enabled
Expand Down
15 changes: 15 additions & 0 deletions test/es5/rules/style/require-jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@
// DESCRIPTION = do not require jsdoc
// STATUS = 2

/* eslint no-unused-vars: 0*/

// <!START
// BAD
/*
function test() {
return 'test';
}
*/

// GOOD
/**
* @returns {string} - something
*/
function test() {
return 'test';
}
// END!>
document.window.append('', null);
36 changes: 36 additions & 0 deletions test/es6/rules/es6/require-jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

// DESCRIPTION = do not require jsdoc
// STATUS = 2

/* eslint no-unused-vars: 0*/

// <!START
// BAD
/*
class Test {
constructor() {
this.test = '12';
}
}
*/

// GOOD
/**
* @constructor Test
*/
class Test {

/**
* @returns {void}
*/
constructor() {
this.test = '12';
}
}

// OKAY
const testArrow = () => 'testArrow';

// END!>
document.window.append('', null);

0 comments on commit 3c23a07

Please sign in to comment.