@lipemat/eslint-config 1.0.1 → 2.0.0-beta.1
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/index.js +79 -75
- package/package.json +3 -6
package/index.js
CHANGED
|
@@ -1,75 +1,79 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
],
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'no-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'react/
|
|
59
|
-
'react/
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true
|
|
4
|
+
},
|
|
5
|
+
'extends': [ 'plugin:@wordpress/eslint-plugin/recommended-with-formatting' ],
|
|
6
|
+
'globals': {
|
|
7
|
+
'$': 'readonly',
|
|
8
|
+
'jQuery': 'readonly',
|
|
9
|
+
},
|
|
10
|
+
'overrides': [ {
|
|
11
|
+
'files': [ '**/*.ts', '**/*.tsx' ],
|
|
12
|
+
'plugins': [
|
|
13
|
+
'@typescript-eslint',
|
|
14
|
+
],
|
|
15
|
+
//Rules to override the standard JS ones when we get undesired results for TypeScript may be found here
|
|
16
|
+
//@link https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
|
|
17
|
+
'rules': {
|
|
18
|
+
'jsdoc/no-undefined-types': [ 0 ],
|
|
19
|
+
'no-magic-numbers': [ 0 ],
|
|
20
|
+
"no-redeclare": [ 0 ],
|
|
21
|
+
"no-shadow": [ 0 ],
|
|
22
|
+
'no-undef': [ 0 ],
|
|
23
|
+
'semi': [ 0 ],
|
|
24
|
+
"@typescript-eslint/no-shadow": [ "error" ],
|
|
25
|
+
"@typescript-eslint/no-redeclare": [ "error" ],
|
|
26
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
27
|
+
'@typescript-eslint/type-annotation-spacing': [ 'warn', {
|
|
28
|
+
before: false,
|
|
29
|
+
after: true,
|
|
30
|
+
overrides: {
|
|
31
|
+
arrow: {
|
|
32
|
+
before: true,
|
|
33
|
+
after: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
} ],
|
|
37
|
+
},
|
|
38
|
+
} ],
|
|
39
|
+
'parser': '@typescript-eslint/parser',
|
|
40
|
+
'parserOptions': {
|
|
41
|
+
'ecmaVersion': 7,
|
|
42
|
+
'sourceType': 'module',
|
|
43
|
+
'warnOnUnsupportedTypeScriptVersion': false,
|
|
44
|
+
},
|
|
45
|
+
'rules': {
|
|
46
|
+
'arrow-parens': [ 1, 'as-needed' ],
|
|
47
|
+
'arrow-spacing': [ 1, {'before': true, 'after': true} ],
|
|
48
|
+
'camelcase': [ 2, {'properties': 'never'} ],
|
|
49
|
+
'indent': [ 1, 'tab', {'SwitchCase': 1} ],
|
|
50
|
+
'lines-around-comment': [ 0 ],
|
|
51
|
+
'jsdoc/require-param': [ 0 ],
|
|
52
|
+
'jsdoc/require-param-type': [ 0 ],
|
|
53
|
+
'jsdoc/require-returns-description': [ 0 ],
|
|
54
|
+
'jsdoc/check-tag-names': [ 1, {'definedTags': [ 'notice', 'link' ]} ],
|
|
55
|
+
'no-console': [ 0 ],
|
|
56
|
+
'no-multiple-empty-lines': [ 'error', {max: 2} ],
|
|
57
|
+
'object-curly-spacing': [ 1, 'never' ],
|
|
58
|
+
'react/no-unescaped-entities': [ 2, {'forbid': [ '>', '}' ]} ],
|
|
59
|
+
'react/display-name': [ 0 ],
|
|
60
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
61
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
62
|
+
'react/jsx-curly-spacing': [ 1, {'when': 'never', 'allowMultiline': false, children: true} ],
|
|
63
|
+
'react/prop-types': [ 2, {'skipUndeclared': true} ],
|
|
64
|
+
'space-before-blocks': [ 1, 'always' ],
|
|
65
|
+
'space-before-function-paren': [ 'error', {
|
|
66
|
+
anonymous: 'never',
|
|
67
|
+
named: 'never',
|
|
68
|
+
asyncArrow: 'ignore',
|
|
69
|
+
} ],
|
|
70
|
+
'space-in-parens': [ 2, 'always' ],
|
|
71
|
+
'template-curly-spacing': [ 1, 'never' ],
|
|
72
|
+
'yoda': [ 2, 'always', {'onlyEquality': true} ],
|
|
73
|
+
},
|
|
74
|
+
'settings': {
|
|
75
|
+
'react': {
|
|
76
|
+
'version': '16.8',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lipemat/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "Eslint configuration for all @lipemat packages",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=13.0.0"
|
|
@@ -16,11 +16,8 @@
|
|
|
16
16
|
"author": "lipemat <mat@matlipe.com>",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@wordpress/eslint-plugin": "^
|
|
20
|
-
"
|
|
21
|
-
"@typescript-eslint/parser": "^4.11.1",
|
|
22
|
-
"babel-eslint": "^10.1.0",
|
|
23
|
-
"eslint": "^7.17.0"
|
|
19
|
+
"@wordpress/eslint-plugin": "^10.0.0",
|
|
20
|
+
"eslint": "^8.8.0"
|
|
24
21
|
},
|
|
25
22
|
"publishConfig": {
|
|
26
23
|
"access": "public"
|