@mimik/local 7.2.0 → 7.2.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.
@@ -0,0 +1,92 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
2
+ import globals from 'globals';
3
+ import importPlugin from 'eslint-plugin-import';
4
+ import js from '@eslint/js';
5
+ import loggerPlugin from '@mimik/eslint-plugin-logger';
6
+ import processDoc from '@mimik/eslint-plugin-document-env';
7
+ import stylistic from '@stylistic/eslint-plugin';
8
+
9
+ const MAX_LENGTH_LINE = 180;
10
+ const MAX_FUNCTION_PARAMETERS = 6;
11
+ const MAX_LINES_IN_FILES = 600;
12
+ const MAX_LINES_IN_FUNCTION = 150;
13
+ const MAX_STATEMENTS_IN_FUNCTION = 45;
14
+ const MIN_KEYS_IN_OBJECT = 10;
15
+ const MAX_COMPLEXITY = 30;
16
+ const ECMA_VERSION = 'latest';
17
+ const MAX_DEPTH = 6;
18
+ const ALLOWED_CONSTANTS = [0, 1, -1];
19
+
20
+ export default [
21
+ {
22
+ ignores: ['mochawesome-report/**', 'node_modules/**', 'dist/**', 'coverage/**'],
23
+ },
24
+ importPlugin.flatConfigs.recommended,
25
+ stylistic.configs.recommended,
26
+ js.configs.all,
27
+ {
28
+ plugins: {
29
+ loggerPlugin,
30
+ processDoc,
31
+ },
32
+ languageOptions: {
33
+ ecmaVersion: ECMA_VERSION,
34
+ globals: {
35
+ ...globals.nodeBuiltin,
36
+ },
37
+ sourceType: 'module',
38
+ },
39
+ rules: {
40
+ '@stylistic/brace-style': ['warn', 'stroustrup', { allowSingleLine: true }],
41
+ '@stylistic/line-comment-position': ['off'],
42
+ '@stylistic/max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true, ignoreStrings: true, ignoreRegExpLiterals: true }],
43
+ '@stylistic/quotes': ['warn', 'single'],
44
+ '@stylistic/semi': ['error', 'always'],
45
+ 'capitalized-comments': ['off'],
46
+ 'complexity': ['error', MAX_COMPLEXITY],
47
+ 'curly': ['off'],
48
+ 'id-length': ['error', { exceptions: ['x', 'y', 'z', 'i', 'j', 'k'] }],
49
+ 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
50
+ 'import/no-unresolved': ['error', { amd: true, caseSensitiveStrict: true, commonjs: true }],
51
+ 'init-declarations': ['off'],
52
+ 'linebreak-style': ['off'],
53
+ 'loggerPlugin/validate-logger-args': ['error'],
54
+ 'max-depth': ['error', MAX_DEPTH],
55
+ 'max-len': ['off'],
56
+ 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true, skipBlankLines: true }],
57
+ 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true, skipBlankLines: true }],
58
+ 'max-params': ['error', MAX_FUNCTION_PARAMETERS],
59
+ 'max-statements': ['warn', MAX_STATEMENTS_IN_FUNCTION],
60
+ 'no-confusing-arrow': ['off'],
61
+ 'no-inline-comments': ['off'],
62
+ 'no-magic-numbers': ['error', { ignore: ALLOWED_CONSTANTS, enforceConst: true, detectObjects: true }],
63
+ 'no-process-env': ['error'],
64
+ 'no-ternary': ['off'],
65
+ 'no-undefined': ['off'],
66
+ 'one-var': ['error', 'never'],
67
+ 'processDoc/validate-document-env': ['error'],
68
+ 'quotes': ['off'],
69
+ 'sort-imports': ['error', { allowSeparatedGroups: true }],
70
+ 'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: MIN_KEYS_IN_OBJECT, natural: false, allowLineSeparatedGroups: true }],
71
+ },
72
+ },
73
+ {
74
+ files: ['test/**', 'manual-test/**'],
75
+ languageOptions: {
76
+ globals: {
77
+ ...globals.mocha,
78
+ },
79
+ },
80
+ rules: {
81
+ 'import/no-named-as-default-member': ['off'],
82
+ 'no-magic-numbers': ['off'],
83
+ 'no-unused-expressions': ['off'],
84
+ 'no-empty-function': ['off'],
85
+ 'max-lines-per-function': ['off'],
86
+ 'max-statements': ['off'],
87
+ 'max-lines': ['off'],
88
+ 'no-process-env': ['off'],
89
+ 'processDoc/validate-document-env': ['off'],
90
+ },
91
+ },
92
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/local",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Local setup configuration for normal and test operation",
5
5
  "main": "./index.js",
6
6
  "type": "module",