@mediatool/eslint-config-mediatool 0.1.14 → 0.1.15

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,22 @@
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
+ ],
13
+ } ],
7
14
  'comma-dangle': [ 'error', {
8
- 'arrays': 'always-multiline',
9
- 'objects': 'always-multiline',
10
- 'imports': 'always-multiline',
11
- 'exports': 'always-multiline',
12
- 'functions': 'never',
15
+ arrays: 'always-multiline',
16
+ objects: 'always-multiline',
17
+ imports: 'always-multiline',
18
+ exports: 'always-multiline',
19
+ functions: 'never',
13
20
  } ],
14
21
  'func-names': 0,
15
22
  'function-paren-newline': 'off',
@@ -18,11 +25,11 @@ module.exports = {
18
25
  'import/no-extraneous-dependencies': [
19
26
  'error',
20
27
  {
21
- 'devDependencies': [
28
+ devDependencies: [
22
29
  '**/features/**/*.js',
23
- '**/test/**/*.js'
24
- ]
25
- }
30
+ '**/test/**/*.js',
31
+ ],
32
+ },
26
33
  ],
27
34
  'jsx-a11y/anchor-is-valid': 'off',
28
35
  'jsx-a11y/click-events-have-key-events': 'off', // Consider enabling later
@@ -34,30 +41,31 @@ module.exports = {
34
41
  'no-nested-ternary': 'off',
35
42
  'no-underscore-dangle': 0,
36
43
  'no-unused-vars': [ 'error', {
37
- 'vars': 'all',
38
- 'args': 'all',
39
- 'argsIgnorePattern': '^_',
40
- 'ignoreRestSiblings': false,
41
- }],
44
+ vars: 'all',
45
+ args: 'all',
46
+ argsIgnorePattern: '^_',
47
+ ignoreRestSiblings: false,
48
+ } ],
42
49
  'react/jsx-boolean-value': [ 'error', 'always' ],
43
- 'react/jsx-curly-spacing': [ 2, { 'when': 'always', 'children': true } ],
50
+ 'react/jsx-curly-spacing': [ 2, { when: 'always', children: true } ],
44
51
  'react/no-multi-comp': 0,
45
52
  'react/no-unescaped-entities': 'off',
46
53
  'react/prefer-es6-class': 0,
47
54
  'react/prop-types': 0,
48
55
  'react/react-in-jsx-scope': 0,
49
- 'semi': [ 'error', 'never' ],
56
+ semi: [ 'error', 'never' ],
50
57
  'space-before-function-paren': [ 'error', 'always' ],
51
58
  },
52
- 'env': {
53
- 'mocha': true,
54
- 'browser': true
59
+ env: {
60
+ mocha: true,
61
+ browser: true,
62
+ },
63
+ parserOptions: {
64
+ ecmaVersion: 9,
65
+ ecmaFeatures: {
66
+ jsx: true,
67
+ modules: true,
68
+ },
55
69
  },
56
- 'parserOptions': {
57
- 'ecmaVersion': 9,
58
- 'ecmaFeatures': {
59
- 'jsx': true,
60
- 'modules': true
61
- }
62
- }
63
70
  }
71
+
@@ -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.15",
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",