@mimik/local 7.1.0 → 7.1.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.
@@ -12,12 +12,12 @@ const MAX_STATEMENTS_IN_FUNCTION = 45;
12
12
  const MIN_KEYS_IN_OBJECT = 10;
13
13
  const MAX_COMPLEXITY = 30;
14
14
  const ECMA_VERSION = 2022;
15
- // eslint-disable-next-line no-magic-numbers
15
+ const MAX_DEPTH = 6;
16
16
  const ALLOWED_CONSTANTS = [0, 1, -1];
17
17
 
18
18
  export default [
19
19
  {
20
- ignores: ['mochawesome-report/**', 'node_modules/**', 'dist/**'],
20
+ ignores: ['mochawesome-report/**', 'node_modules/**', 'dist/**, coverage/**'],
21
21
  },
22
22
  importPlugin.flatConfigs.recommended,
23
23
  stylistic.configs.recommended,
@@ -39,6 +39,7 @@ export default [
39
39
  rules: {
40
40
  '@stylistic/brace-style': ['warn', 'stroustrup', { allowSingleLine: true }],
41
41
  '@stylistic/line-comment-position': ['off'],
42
+ '@stylistic/max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true, ignoreStrings: true, ignoreRegExpLiterals: true }],
42
43
  '@stylistic/semi': ['error', 'always'],
43
44
  'capitalized-comments': ['off'],
44
45
  'complexity': ['error', MAX_COMPLEXITY],
@@ -48,25 +49,22 @@ export default [
48
49
  'import/no-unresolved': ['error', { amd: true, caseSensitiveStrict: true, commonjs: true }],
49
50
  'init-declarations': ['off'],
50
51
  'linebreak-style': ['off'],
51
- 'max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true }],
52
- 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true }],
53
- 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true }],
52
+ 'max-depth': ['error', MAX_DEPTH],
53
+ 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true, skipBlankLines: true }],
54
+ 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true, skipBlankLines: true }],
54
55
  'max-params': ['error', MAX_FUNCTION_PARAMETERS],
55
56
  'max-statements': ['warn', MAX_STATEMENTS_IN_FUNCTION],
56
- 'no-confusing-arrow': ['off'], // arrow isn't confusing
57
+ 'no-confusing-arrow': ['off'],
57
58
  'no-inline-comments': ['off'],
58
- 'no-magic-numbers': ['error', {
59
- ignore: ALLOWED_CONSTANTS,
60
- enforceConst: true,
61
- detectObjects: true,
62
- }],
59
+ 'no-magic-numbers': ['error', { ignore: ALLOWED_CONSTANTS, enforceConst: true, detectObjects: true }],
63
60
  'no-process-env': ['error'],
64
61
  'no-ternary': ['off'],
65
62
  'no-undefined': ['off'],
66
63
  'one-var': ['error', 'never'],
67
64
  'processDoc/validate-document-env': ['error'],
68
65
  'quotes': ['warn', 'single'],
69
- 'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: MIN_KEYS_IN_OBJECT, natural: false }],
66
+ 'sort-imports': ['error', { allowSeparatedGroups: true }],
67
+ 'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: MIN_KEYS_IN_OBJECT, natural: false, allowLineSeparatedGroups: true }],
70
68
  },
71
69
  },
72
70
  ];
package/eslint.config.js CHANGED
@@ -10,7 +10,9 @@ const MAX_LINES_IN_FUNCTION = 150;
10
10
  const MAX_STATEMENTS_IN_FUNCTION = 80;
11
11
  const MIN_KEYS_IN_OBJECT = 10;
12
12
  const MAX_COMPLEXITY = 80;
13
+ const ECMA_VERSION = 2022;
13
14
  const MAX_DEPTH = 6;
15
+ const ALLOWED_CONSTANTS = [0, 1, -1];
14
16
 
15
17
  export default [
16
18
  {
@@ -24,7 +26,7 @@ export default [
24
26
  processDoc,
25
27
  },
26
28
  languageOptions: {
27
- ecmaVersion: 2022,
29
+ ecmaVersion: ECMA_VERSION,
28
30
  globals: {
29
31
  console: 'readonly',
30
32
  describe: 'readonly',
@@ -36,6 +38,7 @@ export default [
36
38
  rules: {
37
39
  '@stylistic/brace-style': ['warn', 'stroustrup', { allowSingleLine: true }],
38
40
  '@stylistic/line-comment-position': ['off'],
41
+ '@stylistic/max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true, ignoreStrings: true, ignoreRegExpLiterals: true }],
39
42
  '@stylistic/semi': ['error', 'always'],
40
43
  'capitalized-comments': ['off'],
41
44
  'complexity': ['error', MAX_COMPLEXITY],
@@ -46,20 +49,21 @@ export default [
46
49
  'init-declarations': ['off'],
47
50
  'linebreak-style': ['off'],
48
51
  'max-depth': ['error', MAX_DEPTH],
49
- 'max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true }],
50
- 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true }],
51
- 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true }],
52
+ 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true, skipBlankLines: true }],
53
+ 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true, skipBlankLines: true }],
52
54
  'max-params': ['error', MAX_FUNCTION_PARAMETERS],
53
55
  'max-statements': ['warn', MAX_STATEMENTS_IN_FUNCTION],
54
- 'no-confusing-arrow': ['off'], // arrow isn't confusing
56
+ 'no-confusing-arrow': ['off'],
55
57
  'no-inline-comments': ['off'],
58
+ 'no-magic-numbers': ['error', { ignore: ALLOWED_CONSTANTS, enforceConst: true, detectObjects: true }],
56
59
  'no-process-env': ['error'],
57
60
  'no-ternary': ['off'],
58
61
  'no-undefined': ['off'],
59
62
  'one-var': ['error', 'never'],
60
63
  'processDoc/validate-document-env': ['error'],
61
64
  'quotes': ['warn', 'single'],
62
- 'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: MIN_KEYS_IN_OBJECT, natural: false }],
65
+ 'sort-imports': ['error', { allowSeparatedGroups: true }],
66
+ 'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: MIN_KEYS_IN_OBJECT, natural: false, allowLineSeparatedGroups: true }],
63
67
  },
64
68
  },
65
69
  ];