Skip to content

Commit

Permalink
Merge pull request #20 from gynzy/YETI-977
Browse files Browse the repository at this point in the history
Linting improvements for unicorn repos
  • Loading branch information
JustinMol authored May 11, 2020
2 parents b6751ae + 823896d commit 1ea42af
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 652 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Gynzy Conventions
This is the conventions repository. Aside from documenting code conventions used at Gynzy, this repository also holds common ESLint configurations used in our services.
This is the conventions repository, describing code conventions and provides ESLint configurations used in unicorn services.

[Conventions Wiki](https://github.com/gynzy/gynzy-conventions/wiki)

## ESLint Installation
To install this package:
Expand Down Expand Up @@ -45,8 +47,3 @@ root/
+-- .eslintrc.js (extends .eslintrc.js)
+-- .prettierrc.js (requires .prettierrc)
```

## Documentation
[Conventions Wiki](https://github.com/gynzy/gynzy-conventions/wiki)

[Ember styleguide](./ember-styleguide.md)
27 changes: 9 additions & 18 deletions configs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,17 @@ module.exports = {
es6: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'plugin:jsdoc/recommended'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 9
ecmaVersion: 9,
},
rules: {
'linebreak-style': ['error', 'unix'],
'valid-jsdoc': ['error'],
'require-jsdoc': [
'error',
{
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
},
},
],
'max-statements': ['error', 20],
complexity: ['error', 10],
'max-depth': ['error', 5],
'max-params': ['error', 5],
'max-statements': ['warn', 20],
complexity: ['warn', 10],
'max-depth': ['warn', 5],
'max-params': ['warn', 5],
'require-await': ['error'],
'prefer-arrow-callback': ['error'],
'no-param-reassign': ['error'],
Expand All @@ -40,6 +29,8 @@ module.exports = {
},
],
'one-var-declaration-per-line': ['error'],
'no-return-await': ['error']
'no-return-await': ['error'],
'jsdoc/no-undefined-types': 'off',
'jsdoc/check-types': 'off',
},
};
1 change: 1 addition & 0 deletions configs/.eslintrc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* ESLint config for test modules like ava.
*/
module.exports = {
root: true,
env: {
es6: true,
node: true,
Expand Down
Loading

0 comments on commit 1ea42af

Please sign in to comment.