@mediatool/eslint-config-mediatool 0.1.14 → 0.1.16

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,15 +1,23 @@
1
1
  module.exports = {
2
- 'extends': 'airbnb',
3
- 'plugins': [ 'mocha', 'react' ],
4
- 'rules': {
2
+ extends: 'airbnb',
3
+ plugins: [ 'mocha', 'react' ],
4
+ rules: {
5
5
  'array-bracket-spacing': [ 'error', 'always' ],
6
6
  'arrow-parens': [ 'error', 'always' ],
7
+ camelcase: [ 'error', {
8
+ allow: [
9
+ 'UNSAFE_componentWillMount',
10
+ 'UNSAFE_componentWillReceiveProps',
11
+ 'UNSAFE_componentWillUpdate',
12
+ '^_mt_',
13
+ ],
14
+ } ],
7
15
  'comma-dangle': [ 'error', {
8
- 'arrays': 'always-multiline',
9
- 'objects': 'always-multiline',
10
- 'imports': 'always-multiline',
11
- 'exports': 'always-multiline',
12
- 'functions': 'never',
16
+ arrays: 'always-multiline',
17
+ objects: 'always-multiline',
18
+ imports: 'always-multiline',
19
+ exports: 'always-multiline',
20
+ functions: 'never',
13
21
  } ],
14
22
  'func-names': 0,
15
23
  'function-paren-newline': 'off',
@@ -18,11 +26,11 @@ module.exports = {
18
26
  'import/no-extraneous-dependencies': [
19
27
  'error',
20
28
  {
21
- 'devDependencies': [
29
+ devDependencies: [
22
30
  '**/features/**/*.js',
23
- '**/test/**/*.js'
24
- ]
25
- }
31
+ '**/test/**/*.js',
32
+ ],
33
+ },
26
34
  ],
27
35
  'jsx-a11y/anchor-is-valid': 'off',
28
36
  'jsx-a11y/click-events-have-key-events': 'off', // Consider enabling later
@@ -34,30 +42,31 @@ module.exports = {
34
42
  'no-nested-ternary': 'off',
35
43
  'no-underscore-dangle': 0,
36
44
  'no-unused-vars': [ 'error', {
37
- 'vars': 'all',
38
- 'args': 'all',
39
- 'argsIgnorePattern': '^_',
40
- 'ignoreRestSiblings': false,
41
- }],
45
+ vars: 'all',
46
+ args: 'all',
47
+ argsIgnorePattern: '^_',
48
+ ignoreRestSiblings: false,
49
+ } ],
42
50
  'react/jsx-boolean-value': [ 'error', 'always' ],
43
- 'react/jsx-curly-spacing': [ 2, { 'when': 'always', 'children': true } ],
51
+ 'react/jsx-curly-spacing': [ 2, { when: 'always', children: true } ],
44
52
  'react/no-multi-comp': 0,
45
53
  'react/no-unescaped-entities': 'off',
46
54
  'react/prefer-es6-class': 0,
47
55
  'react/prop-types': 0,
48
56
  'react/react-in-jsx-scope': 0,
49
- 'semi': [ 'error', 'never' ],
57
+ semi: [ 'error', 'never' ],
50
58
  'space-before-function-paren': [ 'error', 'always' ],
51
59
  },
52
- 'env': {
53
- 'mocha': true,
54
- 'browser': true
60
+ env: {
61
+ mocha: true,
62
+ browser: true,
63
+ },
64
+ parserOptions: {
65
+ ecmaVersion: 9,
66
+ ecmaFeatures: {
67
+ jsx: true,
68
+ modules: true,
69
+ },
55
70
  },
56
- 'parserOptions': {
57
- 'ecmaVersion': 9,
58
- 'ecmaFeatures': {
59
- 'jsx': true,
60
- 'modules': true
61
- }
62
- }
63
71
  }
72
+
package/examples/plain.js CHANGED
@@ -12,6 +12,7 @@ function factory (
12
12
  a,
13
13
  b,
14
14
  c,
15
+ _mt_entry_type: 'planning',
15
16
  }
16
17
  return d(obj)
17
18
  }
@@ -10,6 +10,10 @@ module.exports = function (
10
10
  }
11
11
  }
12
12
 
13
+ UNSAFE_componentWillMount () {
14
+ return this
15
+ }
16
+
13
17
  render () {
14
18
  return <div>{ this.state.message }</div>
15
19
  }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@mediatool/eslint-config-mediatool",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "main": ".eslintrc.js",
5
5
  "scripts": {
6
- "test": "eslint examples/*.*"
6
+ "pretest": "yarn",
7
+ "test": "eslint examples/*.* --max-warnings 0"
7
8
  },
8
9
  "dependencies": {
9
- "eslint": "^6.2.2",
10
+ "eslint": "^7.8.1",
10
11
  "eslint-config-airbnb": "^16.1.0",
11
12
  "eslint-plugin-import": "^2.18.2",
12
13
  "eslint-plugin-jsx-a11y": "^6.2.3",