@mediatool/eslint-config-mediatool 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -1,33 +1,42 @@
1
1
  module.exports = {
2
2
  'extends': 'airbnb',
3
- 'plugins': ['react'],
3
+ 'plugins': [ 'mocha', 'react' ],
4
4
  'rules': {
5
- 'import/extensions': 0,
6
- 'semi': [ 'error', 'never' ],
7
- 'no-underscore-dangle': 0,
8
- 'global-require': 0,
9
- 'func-names': 0,
10
- 'react/prop-types': 0,
11
- 'react/prefer-es6-class': 0,
12
- 'react/no-multi-comp': 0,
13
- 'react/react-in-jsx-scope': 0,
14
- 'react/jsx-boolean-value': [ 'error', 'always' ],
15
- 'react/jsx-curly-spacing': [2, {'when': 'always', 'children': true } ],
16
5
  'array-bracket-spacing': [ 'error', 'always' ],
17
6
  'arrow-parens': [ 'error', 'always' ],
18
- 'space-before-function-paren': [ 'error', 'always' ],
7
+ 'comma-dangle': [ 'error', {
8
+ 'arrays': 'always-multiline',
9
+ 'objects': 'always-multiline',
10
+ 'imports': 'always-multiline',
11
+ 'exports': 'always-multiline',
12
+ 'functions': 'never',
13
+ }],
14
+ 'function-paren-newline': 'off',
15
+ 'global-require': 0,
16
+ 'import/extensions': 0,
17
+ 'func-names': 0,
19
18
  'jsx-a11y/interactive-supports-focus': 'off', // Consider enabling later
20
19
  'jsx-a11y/no-static-element-interactions': 'off', // Consider enabling later
21
20
  'jsx-a11y/click-events-have-key-events': 'off', // Consider enabling later
22
- 'no-unused-vars': ['error', {
21
+ 'no-nested-ternary': 'off',
22
+ 'no-underscore-dangle': 0,
23
+ 'no-unused-vars': [ 'error', {
23
24
  'vars': 'all',
24
25
  'args': 'all',
25
26
  'argsIgnorePattern': '^_',
26
27
  'ignoreRestSiblings': false,
27
28
  }],
28
- 'no-nested-ternary': 'off',
29
+ 'react/prop-types': 0,
30
+ 'react/prefer-es6-class': 0,
31
+ 'react/no-multi-comp': 0,
32
+ 'react/react-in-jsx-scope': 0,
33
+ 'react/jsx-boolean-value': [ 'error', 'always' ],
34
+ 'react/jsx-curly-spacing': [ 2, { 'when': 'always', 'children': true } ],
35
+ 'semi': [ 'error', 'never' ],
36
+ 'space-before-function-paren': [ 'error', 'always' ],
29
37
  },
30
38
  'env': {
39
+ 'mocha': true,
31
40
  'browser': true
32
41
  },
33
42
  'parserOptions': {
package/examples/plain.js CHANGED
@@ -2,4 +2,19 @@ function hello (_, x) {
2
2
  return x
3
3
  }
4
4
 
5
+ function factory (
6
+ a,
7
+ b,
8
+ c,
9
+ d
10
+ ) {
11
+ const obj = {
12
+ a,
13
+ b,
14
+ c,
15
+ }
16
+ return d(obj)
17
+ }
18
+
19
+ factory()
5
20
  hello()
@@ -1,4 +1,6 @@
1
- module.exports = function (React) {
1
+ module.exports = function (
2
+ React
3
+ ) {
2
4
  const { PureComponent } = React
3
5
  class ExampleComponent extends PureComponent {
4
6
  constructor (props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediatool/eslint-config-mediatool",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "main": ".eslintrc.js",
5
5
  "scripts": {
6
6
  "test": "eslint examples/*.*"
@@ -10,6 +10,7 @@
10
10
  "eslint-config-airbnb": "^16.1.0",
11
11
  "eslint-plugin-import": "^2.12.0",
12
12
  "eslint-plugin-jsx-a11y": "^6.0.3",
13
+ "eslint-plugin-mocha": "^5.0.0",
13
14
  "eslint-plugin-react": "^7.8.2"
14
15
  }
15
16
  }