@lidofinance/eslint-config 0.0.2 → 0.11.0

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/rulesets/hard.js CHANGED
@@ -1,72 +1,72 @@
1
- const { nextRules, tsRules, reactRules, defaultRules } = require('./easy')
1
+ const { nextRules, tsRules, reactRules, defaultRules } = require("./easy");
2
2
 
3
3
  module.exports = {
4
- nextRules: {
5
- ...nextRules,
6
- },
7
- tsRules,
8
- reactRules: {
9
- ...reactRules,
10
- 'react/prop-types': 'error',
11
- },
12
- defaultRules: {
13
- ...defaultRules,
14
- 'promise/always-return': 'error',
15
- 'promise/catch-or-return': 'error',
16
- 'promise/no-native': 'off',
17
- 'promise/no-nesting': 'warn',
18
- 'promise/no-promise-in-callback': 'warn',
19
- 'promise/no-callback-in-promise': 'warn',
20
- 'promise/no-new-statics': 'error',
21
- 'promise/no-return-in-finally': 'warn',
22
- 'promise/valid-params': 'warn',
23
- 'import/no-named-as-default': 'warn',
24
- 'import/no-named-as-default-member': 'warn',
25
- 'import/no-duplicates': 'warn',
26
- 'sonarjs/cognitive-complexity': 'warn',
27
- 'sonarjs/prefer-immediate-return': 'error',
28
- 'unicorn/consistent-destructuring': 'error',
29
- 'unicorn/custom-error-definition': 'error',
30
- 'unicorn/no-abusive-eslint-disable': 'error',
31
- 'no-nested-ternary': 'error',
32
- 'unicorn/no-unsafe-regex': 'error',
33
- 'unicorn/no-unused-properties': 'error',
34
- 'unicorn/no-useless-fallback-in-spread': 'error',
35
- 'unicorn/numeric-separators-style': 'warn',
36
- 'unicorn/prefer-at': 'warn',
37
- 'unicorn/prefer-code-point': 'warn',
38
- 'unicorn/prefer-date-now': 'warn',
39
- 'unicorn/prefer-default-parameters': 'warn',
40
- 'unicorn/prefer-dom-node-append': 'warn',
41
- 'unicorn/prefer-dom-node-dataset': 'warn',
42
- 'unicorn/prefer-dom-node-remove': 'warn',
43
- 'unicorn/prefer-dom-node-text-content': 'warn',
44
- 'unicorn/prefer-export-from': 'warn',
45
- 'unicorn/prefer-includes': 'warn',
46
- 'unicorn/prefer-json-parse-buffer': 'warn',
47
- 'unicorn/prefer-keyboard-event-key': 'warn',
48
- 'unicorn/prefer-math-trunc': 'warn',
49
- 'unicorn/prefer-modern-dom-apis': 'warn',
50
- 'unicorn/prefer-modern-math-apis': 'warn',
51
- 'unicorn/prefer-native-coercion-functions': 'warn',
52
- 'unicorn/prefer-negative-index': 'warn',
53
- 'unicorn/prefer-number-properties': 'warn',
54
- 'unicorn/prefer-object-from-entries': 'warn',
55
- 'unicorn/prefer-optional-catch-binding': 'warn',
56
- 'unicorn/prefer-prototype-methods': 'warn',
57
- 'unicorn/prefer-query-selector': 'warn',
58
- 'unicorn/prefer-reflect-apply': 'warn',
59
- 'unicorn/prefer-regexp-test': 'warn',
60
- 'unicorn/prefer-set-has': 'warn',
61
- 'unicorn/prefer-spread': 'warn',
62
- 'unicorn/prefer-string-replace-all': 'warn',
63
- 'unicorn/prefer-string-slice': 'warn',
64
- 'unicorn/prefer-string-starts-ends-with': 'warn',
65
- 'unicorn/prefer-string-trim-start-end': 'warn',
66
- 'unicorn/prefer-switch': 'warn',
67
- 'unicorn/prefer-ternary': 'warn',
68
- 'unicorn/prefer-top-level-await': 'warn',
69
- 'unicorn/prefer-type-error': 'warn',
70
- 'unicorn/string-content': 'error',
71
- },
72
- }
4
+ nextRules: {
5
+ ...nextRules,
6
+ },
7
+ tsRules,
8
+ reactRules: {
9
+ ...reactRules,
10
+ "react/prop-types": "error",
11
+ },
12
+ defaultRules: {
13
+ ...defaultRules,
14
+ "promise/always-return": "error",
15
+ "promise/catch-or-return": "error",
16
+ "promise/no-native": "off",
17
+ "promise/no-nesting": "warn",
18
+ "promise/no-promise-in-callback": "warn",
19
+ "promise/no-callback-in-promise": "warn",
20
+ "promise/no-new-statics": "error",
21
+ "promise/no-return-in-finally": "warn",
22
+ "promise/valid-params": "warn",
23
+ "import/no-named-as-default": "warn",
24
+ "import/no-named-as-default-member": "warn",
25
+ "import/no-duplicates": "warn",
26
+ "sonarjs/cognitive-complexity": "warn",
27
+ "sonarjs/prefer-immediate-return": "error",
28
+ "unicorn/consistent-destructuring": "error",
29
+ "unicorn/custom-error-definition": "error",
30
+ "unicorn/no-abusive-eslint-disable": "error",
31
+ "no-nested-ternary": "error",
32
+ "unicorn/no-unsafe-regex": "error",
33
+ "unicorn/no-unused-properties": "error",
34
+ "unicorn/no-useless-fallback-in-spread": "error",
35
+ "unicorn/numeric-separators-style": "warn",
36
+ "unicorn/prefer-at": "warn",
37
+ "unicorn/prefer-code-point": "warn",
38
+ "unicorn/prefer-date-now": "warn",
39
+ "unicorn/prefer-default-parameters": "warn",
40
+ "unicorn/prefer-dom-node-append": "warn",
41
+ "unicorn/prefer-dom-node-dataset": "warn",
42
+ "unicorn/prefer-dom-node-remove": "warn",
43
+ "unicorn/prefer-dom-node-text-content": "warn",
44
+ "unicorn/prefer-export-from": "warn",
45
+ "unicorn/prefer-includes": "warn",
46
+ "unicorn/prefer-json-parse-buffer": "warn",
47
+ "unicorn/prefer-keyboard-event-key": "warn",
48
+ "unicorn/prefer-math-trunc": "warn",
49
+ "unicorn/prefer-modern-dom-apis": "warn",
50
+ "unicorn/prefer-modern-math-apis": "warn",
51
+ "unicorn/prefer-native-coercion-functions": "warn",
52
+ "unicorn/prefer-negative-index": "warn",
53
+ "unicorn/prefer-number-properties": "warn",
54
+ "unicorn/prefer-object-from-entries": "warn",
55
+ "unicorn/prefer-optional-catch-binding": "warn",
56
+ "unicorn/prefer-prototype-methods": "warn",
57
+ "unicorn/prefer-query-selector": "warn",
58
+ "unicorn/prefer-reflect-apply": "warn",
59
+ "unicorn/prefer-regexp-test": "warn",
60
+ "unicorn/prefer-set-has": "warn",
61
+ "unicorn/prefer-spread": "warn",
62
+ "unicorn/prefer-string-replace-all": "warn",
63
+ "unicorn/prefer-string-slice": "warn",
64
+ "unicorn/prefer-string-starts-ends-with": "warn",
65
+ "unicorn/prefer-string-trim-start-end": "warn",
66
+ "unicorn/prefer-switch": "warn",
67
+ "unicorn/prefer-ternary": "warn",
68
+ "unicorn/prefer-top-level-await": "warn",
69
+ "unicorn/prefer-type-error": "warn",
70
+ "unicorn/string-content": "error",
71
+ },
72
+ };
package/.eslintrc DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "root": true,
3
- "plugins": [
4
- "prettier"
5
- ],
6
- "extends": [
7
- "./auto-hard.js"
8
- ],
9
- "rules": {
10
- "prettier/prettier": "error"
11
- }
12
- }