eslint-config-cheminfo
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -0,1 +1,11 @@ | ||
<a name="1.11.0"></a> | ||
# [1.11.0](https://github.com/cheminfo/eslint-config/compare/v1.10.0...v1.11.0) (2018-01-09) | ||
### Features | ||
* set ES6 rules ([b8f8bbe](https://github.com/cheminfo/eslint-config/commit/b8f8bbe)) | ||
<a name="1.10.0"></a> | ||
@@ -2,0 +12,0 @@ # [1.10.0](https://github.com/cheminfo/eslint-config/compare/v1.9.1...v1.10.0) (2018-01-09) |
117
index.js
@@ -13,5 +13,3 @@ 'use strict'; | ||
extends: 'eslint:recommended', | ||
plugins: [ | ||
'jest' | ||
], | ||
plugins: ['jest'], | ||
rules: { | ||
@@ -25,3 +23,3 @@ // Possible Errors (http://eslint.org/docs/rules/#possible-errors) | ||
'no-console': 'error', | ||
'no-constant-condition': ['error', {checkLoops: false}], | ||
'no-constant-condition': ['error', { checkLoops: false }], | ||
'no-control-regex': 'error', | ||
@@ -52,21 +50,24 @@ 'no-debugger': 'error', | ||
'use-isnan': 'error', | ||
'valid-jsdoc': ['warn', { | ||
prefer: { | ||
arg: 'param', | ||
argument: 'param', | ||
returns: 'return', | ||
}, | ||
preferType: { | ||
array: 'Array', | ||
Boolean: 'boolean', | ||
Function: 'function', | ||
Number: 'number', | ||
Object: 'object', | ||
String: 'string' | ||
}, | ||
requireReturn: false, | ||
requireReturnType: true, | ||
requireParamDescription: false, | ||
requireReturnDescription: false | ||
}], | ||
'valid-jsdoc': [ | ||
'warn', | ||
{ | ||
prefer: { | ||
arg: 'param', | ||
argument: 'param', | ||
returns: 'return' | ||
}, | ||
preferType: { | ||
array: 'Array', | ||
Boolean: 'boolean', | ||
Function: 'function', | ||
Number: 'number', | ||
Object: 'object', | ||
String: 'string' | ||
}, | ||
requireReturn: false, | ||
requireReturnType: true, | ||
requireParamDescription: false, | ||
requireReturnDescription: false | ||
} | ||
], | ||
'valid-typeof': 'error', | ||
@@ -79,9 +80,9 @@ | ||
'class-methods-use-this': 'off', | ||
'complexity': 'off', // todo: enable? | ||
complexity: 'off', // todo: enable? | ||
'consistent-return': 'error', | ||
'curly': ['error', 'multi-line', 'consistent'], | ||
curly: ['error', 'multi-line', 'consistent'], | ||
'default-case': 'error', | ||
'dot-location': ['error', 'property'], | ||
'dot-notation': 'error', | ||
'eqeqeq': ['error', 'allow-null'], | ||
eqeqeq: ['error', 'allow-null'], | ||
'guard-for-in': 'off', | ||
@@ -141,11 +142,44 @@ 'no-alert': 'error', | ||
'prefer-promise-reject-errors': 'error', | ||
'radix': 'warn', | ||
radix: 'warn', | ||
'require-await': 'error', | ||
'vars-on-top': 'off', // todo: maybe warn later | ||
'wrap-iife': ['error', 'inside'], | ||
'yoda': 'error', | ||
yoda: 'error', | ||
// Strict Mode (https://eslint.org/docs/rules/#strict-mode) | ||
'strict': ['error', 'global'], | ||
strict: ['error', 'global'], | ||
// ECMAScript 6 (https://eslint.org/docs/rules/#ecmascript-6) | ||
'arrow-body-style': 'off', | ||
'arrow-parens': 'error', | ||
'arrow-spacing': 'error', | ||
'constructor-super': 'error', | ||
'generator-star-spacing': 'off', // conflicts with prettier | ||
'no-class-assign': 'error', | ||
'no-confusing-arrow': ['error', { allowParens: true }], | ||
'no-const-assign': 'error', | ||
'no-dupe-class-members': 'error', | ||
'no-duplicate-imports': ['error', { includeExports: true }], | ||
'no-new-symbol': 'error', | ||
'no-restricted-imports': 'off', | ||
'no-this-before-super': 'error', | ||
'no-useless-computed-key': 'error', | ||
'no-useless-constructor': 'error', | ||
'no-useless-rename': 'error', | ||
'no-var': 'off', // too soon for enabling this globally | ||
'object-shorthand': 'off', // complex | ||
'prefer-arrow-callback': 'off', // complex | ||
'prefer-const': 'off', | ||
'prefer-destructuring': 'off', | ||
'prefer-numeric-literals': 'error', | ||
'prefer-rest-params': 'error', | ||
'prefer-spread': 'error', | ||
'prefer-template': 'warn', | ||
'require-yield': 'error', | ||
'rest-spread-spacing': 'error', | ||
'sort-imports': 'off', | ||
'symbol-description': 'error', | ||
'template-curly-spacing': ['error', 'never'], | ||
'yield-star-spacing': ['error', 'after'], | ||
// todo continue the list | ||
@@ -155,9 +189,9 @@ | ||
'brace-style': ['error', '1tbs'], | ||
'camelcase': 'error', | ||
camelcase: 'error', | ||
'comma-dangle': 'off', | ||
'comma-spacing': ['error', {after: true, before: false}], | ||
'comma-spacing': ['error', { after: true, before: false }], | ||
'comma-style': 'error', | ||
'eol-last': 'error', | ||
'func-call-spacing': 'error', | ||
'indent': ['error', 4, {SwitchCase: 1}], | ||
indent: ['error', 4, { SwitchCase: 1 }], | ||
'key-spacing': 'error', | ||
@@ -170,3 +204,3 @@ 'keyword-spacing': 'error', | ||
'no-mixed-spaces-and-tabs': 'error', | ||
'no-multiple-empty-lines': ['error', {max: 2, maxEOF: 1, maxBOF: 1}], | ||
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 1 }], | ||
'no-new-object': 'error', | ||
@@ -178,13 +212,16 @@ 'no-shadow-restricted-names': 'error', | ||
'no-unused-vars': 'error', | ||
'object-curly-spacing': ['error', 'never'], | ||
'one-var': ['error', {initialized: 'never'}], | ||
'object-curly-spacing': ['error', 'always'], | ||
'one-var': ['error', { initialized: 'never' }], | ||
'one-var-declaration-per-line': ['error', 'initializations'], | ||
'quote-props': ['error', 'as-needed'], | ||
'quotes': ['error', 'single', 'avoid-escape'], | ||
'semi': 'error', | ||
'semi-spacing': ['error', {after: true, before: false}], | ||
quotes: ['error', 'single', 'avoid-escape'], | ||
semi: 'error', | ||
'semi-spacing': ['error', { after: true, before: false }], | ||
'space-before-blocks': 'error', | ||
'space-before-function-paren': ['error', {anonymous: 'always', named: 'never'}], | ||
'space-before-function-paren': [ | ||
'error', | ||
{ anonymous: 'always', named: 'never' } | ||
], | ||
'space-in-parens': ['error', 'never'], | ||
'space-infix-ops': ['error', {int32Hint: true}], | ||
'space-infix-ops': ['error', { int32Hint: true }], | ||
'space-unary-ops': 'error', | ||
@@ -191,0 +228,0 @@ |
{ | ||
"name": "eslint-config-cheminfo", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"description": "Shared ESLint config for cheminfo and ml.js projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,6 +0,26 @@ | ||
# eslint-config | ||
Shared ESLint config for cheminfo and ml.js projects | ||
# eslint-config-cheminfo | ||
Shared ESLint config for cheminfo and ml.js projects. | ||
## Installation | ||
`npm install --save-dev eslint-config-cheminfo eslint eslint-plugin-no-only-tests` | ||
``` | ||
npm install --save-dev \ | ||
eslint-config-cheminfo \ | ||
eslint \ | ||
eslint-plugin-jest | ||
``` | ||
## Usage | ||
Create a `.eslintrc.yml` with the following contents: | ||
```yml | ||
extends: cheminfo | ||
``` | ||
You can then customize the config for your project by changing rules in this file. | ||
## Using React? | ||
Check out our extension at https://github.com/neptunejs/eslint-config-neptune-react |
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
15574
224
27