@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 +38 -29
- package/examples/plain.js +1 -0
- package/examples/react-component.jsx +4 -0
- package/package.json +4 -3
package/.eslintrc.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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, {
|
|
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
|
-
|
|
57
|
+
semi: [ 'error', 'never' ],
|
|
50
58
|
'space-before-function-paren': [ 'error', 'always' ],
|
|
51
59
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediatool/eslint-config-mediatool",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"main": ".eslintrc.js",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
6
|
+
"pretest": "yarn",
|
|
7
|
+
"test": "eslint examples/*.* --max-warnings 0"
|
|
7
8
|
},
|
|
8
9
|
"dependencies": {
|
|
9
|
-
"eslint": "^
|
|
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",
|