@perfective/eslint-config 0.29.1 → 0.30.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/LICENSE +1 -1
- package/README.adoc +24 -19
- package/README.md +20 -17
- package/config/node.d.ts +7 -0
- package/config/node.js +7 -11
- package/config/plugin.d.ts +9 -0
- package/config/plugin.js +22 -26
- package/config.js +1 -6
- package/cypress.d.ts +5 -0
- package/cypress.js +31 -58
- package/index.d.ts +58 -26
- package/index.js +100 -145
- package/jest-dom.js +8 -11
- package/jest.d.ts +6 -0
- package/jest.js +29 -24
- package/package.json +18 -18
- package/rules/array-func/index.d.ts +1 -2
- package/rules/array-func/index.js +14 -50
- package/rules/cypress/index.d.ts +11 -3
- package/rules/cypress/index.js +23 -57
- package/rules/eslint/index.js +6 -9
- package/rules/eslint/layout-formatting.js +64 -67
- package/rules/eslint/possible-problems.js +96 -99
- package/rules/eslint/suggestions.js +181 -182
- package/rules/eslint-comments/best-practices.js +8 -11
- package/rules/eslint-comments/index.d.ts +1 -2
- package/rules/eslint-comments/index.js +9 -45
- package/rules/eslint-comments/stylistic-issues.js +9 -18
- package/rules/import/helpful-warnings.js +11 -14
- package/rules/import/index.js +11 -14
- package/rules/import/module-systems.js +10 -13
- package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
- package/rules/import/rules/no-extraneous-dependencies.js +20 -21
- package/rules/import/static-analysis.js +26 -29
- package/rules/import/style-guide.js +33 -36
- package/rules/jest/index.js +98 -72
- package/rules/jest/typescript-eslint.js +5 -8
- package/rules/jest-dom/index.js +19 -55
- package/rules/jsdoc/index.d.ts +1 -1
- package/rules/jsdoc/index.js +158 -344
- package/rules/n/index.d.ts +1 -1
- package/rules/n/index.js +64 -98
- package/rules/prefer-arrow/index.d.ts +1 -2
- package/rules/prefer-arrow/index.js +14 -50
- package/rules/promise/index.d.ts +1 -2
- package/rules/promise/index.js +35 -73
- package/rules/rxjs/index.d.ts +1 -1
- package/rules/rxjs/index.js +60 -96
- package/rules/security/index.d.ts +1 -2
- package/rules/security/index.js +22 -58
- package/rules/simple-import-sort/index.js +12 -48
- package/rules/simple-import-sort/rules/imports.d.ts +11 -0
- package/rules/simple-import-sort/rules/imports.js +18 -32
- package/rules/stylistic/js/index.d.ts +9 -2
- package/rules/stylistic/js/index.js +198 -236
- package/rules/stylistic/jsx/index.d.ts +8 -2
- package/rules/stylistic/jsx/index.js +81 -117
- package/rules/stylistic/plus/index.d.ts +6 -2
- package/rules/stylistic/plus/index.js +14 -50
- package/rules/stylistic/ts/index.d.ts +8 -2
- package/rules/stylistic/ts/index.js +135 -169
- package/rules/testing-library/index.js +41 -77
- package/rules/typescript-eslint/extension-rules.js +113 -116
- package/rules/typescript-eslint/index.d.ts +2 -0
- package/rules/typescript-eslint/index.js +9 -45
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
- package/rules/typescript-eslint/supported-rules.d.ts +2 -0
- package/rules/typescript-eslint/supported-rules.js +256 -319
- package/rules/unicorn/index.d.ts +7 -2
- package/rules/unicorn/index.js +178 -209
- package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
- package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
- package/rules.js +4 -14
- package/rxjs.d.ts +5 -0
- package/rxjs.js +21 -57
- package/testing-library.js +8 -11
package/rules/n/index.js
CHANGED
|
@@ -1,98 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
allowAtRootLevel: false,
|
|
66
|
-
}],
|
|
67
|
-
'n/no-unpublished-bin': 'error',
|
|
68
|
-
'n/no-unpublished-import': ['error', {
|
|
69
|
-
ignorePrivate: false,
|
|
70
|
-
}],
|
|
71
|
-
'n/no-unpublished-require': ['error', {
|
|
72
|
-
allowModules: [],
|
|
73
|
-
ignorePrivate: false,
|
|
74
|
-
tryExtensions: ['.js', '.json', '.node'],
|
|
75
|
-
}],
|
|
76
|
-
'n/no-unsupported-features/es-builtins': ['error', {
|
|
77
|
-
version: '>=18.0.0',
|
|
78
|
-
ignores: [],
|
|
79
|
-
}],
|
|
80
|
-
'n/no-unsupported-features/es-syntax': 'off',
|
|
81
|
-
'n/no-unsupported-features/node-builtins': ['error', {
|
|
82
|
-
version: '>=18.0.0',
|
|
83
|
-
ignores: [],
|
|
84
|
-
}],
|
|
85
|
-
'n/prefer-global/buffer': ['error', 'always'],
|
|
86
|
-
'n/prefer-global/console': ['error', 'always'],
|
|
87
|
-
'n/prefer-global/process': ['error', 'always'],
|
|
88
|
-
'n/prefer-global/text-decoder': ['error', 'always'],
|
|
89
|
-
'n/prefer-global/text-encoder': ['error', 'always'],
|
|
90
|
-
'n/prefer-global/url': ['error', 'always'],
|
|
91
|
-
'n/prefer-global/url-search-params': ['error', 'always'],
|
|
92
|
-
'n/prefer-node-protocol': 'off',
|
|
93
|
-
'n/prefer-promises/dns': 'error',
|
|
94
|
-
'n/prefer-promises/fs': 'error',
|
|
95
|
-
'n/process-exit-as-throw': 'error',
|
|
96
|
-
'n/shebang': 'off',
|
|
97
|
-
},
|
|
98
|
-
};
|
|
1
|
+
import eslintPluginN from 'eslint-plugin-n';
|
|
2
|
+
export const nConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
n: eslintPluginN
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'n/callback-return': ['error', ['callback', 'cb', 'next']],
|
|
8
|
+
'n/exports-style': ['warn', 'module.exports', {
|
|
9
|
+
allowBatchAssign: false
|
|
10
|
+
}],
|
|
11
|
+
'n/file-extension-in-import': 'off',
|
|
12
|
+
'n/global-require': 'error',
|
|
13
|
+
'n/handle-callback-err': 'error',
|
|
14
|
+
'n/hashbang': 'warn',
|
|
15
|
+
'n/no-callback-literal': 'error',
|
|
16
|
+
'n/no-deprecated-api': 'error',
|
|
17
|
+
'n/no-exports-assign': 'error',
|
|
18
|
+
'n/no-extraneous-import': 'off',
|
|
19
|
+
'n/no-extraneous-require': 'off',
|
|
20
|
+
'n/no-hide-core-modules': 'off',
|
|
21
|
+
'n/no-missing-import': 'off',
|
|
22
|
+
'n/no-missing-require': 'off',
|
|
23
|
+
'n/no-mixed-requires': 'error',
|
|
24
|
+
'n/no-new-require': 'error',
|
|
25
|
+
'n/no-path-concat': 'error',
|
|
26
|
+
'n/no-process-env': 'error',
|
|
27
|
+
'n/no-process-exit': 'off',
|
|
28
|
+
'n/no-restricted-import': 'error',
|
|
29
|
+
'n/no-restricted-require': 'error',
|
|
30
|
+
'n/no-sync': ['error', {
|
|
31
|
+
allowAtRootLevel: false
|
|
32
|
+
}],
|
|
33
|
+
'n/no-unpublished-bin': 'error',
|
|
34
|
+
'n/no-unpublished-import': ['error', {
|
|
35
|
+
ignorePrivate: false
|
|
36
|
+
}],
|
|
37
|
+
'n/no-unpublished-require': ['error', {
|
|
38
|
+
allowModules: [],
|
|
39
|
+
ignorePrivate: false,
|
|
40
|
+
tryExtensions: ['.js', '.json', '.node']
|
|
41
|
+
}],
|
|
42
|
+
'n/no-unsupported-features/es-builtins': ['error', {
|
|
43
|
+
version: '>=18.0.0',
|
|
44
|
+
ignores: []
|
|
45
|
+
}],
|
|
46
|
+
'n/no-unsupported-features/es-syntax': 'off',
|
|
47
|
+
'n/no-unsupported-features/node-builtins': ['error', {
|
|
48
|
+
version: '>=18.0.0',
|
|
49
|
+
ignores: []
|
|
50
|
+
}],
|
|
51
|
+
'n/prefer-global/buffer': ['error', 'always'],
|
|
52
|
+
'n/prefer-global/console': ['error', 'always'],
|
|
53
|
+
'n/prefer-global/process': ['error', 'always'],
|
|
54
|
+
'n/prefer-global/text-decoder': ['error', 'always'],
|
|
55
|
+
'n/prefer-global/text-encoder': ['error', 'always'],
|
|
56
|
+
'n/prefer-global/url': ['error', 'always'],
|
|
57
|
+
'n/prefer-global/url-search-params': ['error', 'always'],
|
|
58
|
+
'n/prefer-node-protocol': 'off',
|
|
59
|
+
'n/prefer-promises/dns': 'error',
|
|
60
|
+
'n/prefer-promises/fs': 'error',
|
|
61
|
+
'n/process-exit-as-throw': 'error',
|
|
62
|
+
'n/shebang': 'off'
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as eslintPluginPreferArrow from 'eslint-plugin-prefer-arrow';
|
|
2
1
|
export declare const preferArrowConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
'prefer-arrow':
|
|
3
|
+
'prefer-arrow': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
5
4
|
};
|
|
6
5
|
rules: {
|
|
7
6
|
'prefer-arrow/prefer-arrow-functions': (string | {
|
|
@@ -1,50 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.preferArrowConfig = void 0;
|
|
37
|
-
const eslintPluginPreferArrow = __importStar(require("eslint-plugin-prefer-arrow"));
|
|
38
|
-
exports.preferArrowConfig = {
|
|
39
|
-
plugins: {
|
|
40
|
-
'prefer-arrow': eslintPluginPreferArrow,
|
|
41
|
-
},
|
|
42
|
-
rules: {
|
|
43
|
-
'prefer-arrow/prefer-arrow-functions': ['error', {
|
|
44
|
-
allowStandaloneDeclarations: true,
|
|
45
|
-
classPropertiesAllowed: false,
|
|
46
|
-
disallowPrototype: false,
|
|
47
|
-
singleReturnOnly: false,
|
|
48
|
-
}],
|
|
49
|
-
},
|
|
50
|
-
};
|
|
1
|
+
import eslintPluginPreferArrow from 'eslint-plugin-prefer-arrow';
|
|
2
|
+
export const preferArrowConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'prefer-arrow': eslintPluginPreferArrow
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'prefer-arrow/prefer-arrow-functions': ['error', {
|
|
8
|
+
allowStandaloneDeclarations: true,
|
|
9
|
+
classPropertiesAllowed: false,
|
|
10
|
+
disallowPrototype: false,
|
|
11
|
+
singleReturnOnly: false
|
|
12
|
+
}]
|
|
13
|
+
}
|
|
14
|
+
};
|
package/rules/promise/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as eslintPluginPromise from 'eslint-plugin-promise';
|
|
2
1
|
export declare const promiseConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
promise:
|
|
3
|
+
promise: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
5
4
|
};
|
|
6
5
|
rules: {
|
|
7
6
|
'promise/catch-or-return': (string | {
|
package/rules/promise/index.js
CHANGED
|
@@ -1,73 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
exports.promiseConfig = void 0;
|
|
37
|
-
const eslintPluginPromise = __importStar(require("eslint-plugin-promise"));
|
|
38
|
-
exports.promiseConfig = {
|
|
39
|
-
plugins: {
|
|
40
|
-
promise: eslintPluginPromise,
|
|
41
|
-
},
|
|
42
|
-
rules: {
|
|
43
|
-
'promise/catch-or-return': ['error', {
|
|
44
|
-
allowThen: false,
|
|
45
|
-
allowThenStrict: false,
|
|
46
|
-
allowFinally: true,
|
|
47
|
-
}],
|
|
48
|
-
'promise/no-return-wrap': 'error',
|
|
49
|
-
'promise/param-names': 'warn',
|
|
50
|
-
'promise/always-return': ['error', {
|
|
51
|
-
ignoreAssignmentVariable: [
|
|
52
|
-
'globalThis',
|
|
53
|
-
],
|
|
54
|
-
}],
|
|
55
|
-
'promise/no-multiple-resolved': 'error',
|
|
56
|
-
'promise/no-native': 'off',
|
|
57
|
-
'promise/no-nesting': 'error',
|
|
58
|
-
'promise/no-promise-in-callback': 'error',
|
|
59
|
-
'promise/no-callback-in-promise': ['error', {
|
|
60
|
-
timeoutsErr: false,
|
|
61
|
-
}],
|
|
62
|
-
'promise/avoid-new': 'off',
|
|
63
|
-
'promise/no-new-statics': 'warn',
|
|
64
|
-
'promise/no-return-in-finally': 'error',
|
|
65
|
-
'promise/prefer-catch': 'warn',
|
|
66
|
-
'promise/spec-only': ['error', {
|
|
67
|
-
allowedMethods: [],
|
|
68
|
-
}],
|
|
69
|
-
'promise/valid-params': 'error',
|
|
70
|
-
'promise/prefer-await-to-then': 'off',
|
|
71
|
-
'promise/prefer-await-to-callbacks': 'off',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
1
|
+
import eslintPluginPromise from 'eslint-plugin-promise';
|
|
2
|
+
export const promiseConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
promise: eslintPluginPromise
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'promise/catch-or-return': ['error', {
|
|
8
|
+
allowThen: false,
|
|
9
|
+
allowThenStrict: false,
|
|
10
|
+
allowFinally: true
|
|
11
|
+
}],
|
|
12
|
+
'promise/no-return-wrap': 'error',
|
|
13
|
+
'promise/param-names': 'warn',
|
|
14
|
+
'promise/always-return': ['error', {
|
|
15
|
+
ignoreAssignmentVariable: ['globalThis']
|
|
16
|
+
}],
|
|
17
|
+
'promise/no-multiple-resolved': 'error',
|
|
18
|
+
'promise/no-native': 'off',
|
|
19
|
+
'promise/no-nesting': 'error',
|
|
20
|
+
'promise/no-promise-in-callback': 'error',
|
|
21
|
+
'promise/no-callback-in-promise': ['error', {
|
|
22
|
+
timeoutsErr: false
|
|
23
|
+
}],
|
|
24
|
+
'promise/avoid-new': 'off',
|
|
25
|
+
'promise/no-new-statics': 'warn',
|
|
26
|
+
'promise/no-return-in-finally': 'error',
|
|
27
|
+
'promise/prefer-catch': 'warn',
|
|
28
|
+
'promise/spec-only': ['error', {
|
|
29
|
+
allowedMethods: []
|
|
30
|
+
}],
|
|
31
|
+
'promise/valid-params': 'error',
|
|
32
|
+
'promise/prefer-await-to-then': 'off',
|
|
33
|
+
'promise/prefer-await-to-callbacks': 'off'
|
|
34
|
+
}
|
|
35
|
+
};
|
package/rules/rxjs/index.d.ts
CHANGED
package/rules/rxjs/index.js
CHANGED
|
@@ -1,96 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
'@smarttools/rxjs/no-create': 'error',
|
|
62
|
-
'@smarttools/rxjs/no-cyclic-action': 'error',
|
|
63
|
-
'@smarttools/rxjs/no-explicit-generics': 'off',
|
|
64
|
-
'@smarttools/rxjs/no-exposed-subjects': 'error',
|
|
65
|
-
'@smarttools/rxjs/no-finnish': 'off',
|
|
66
|
-
'@smarttools/rxjs/no-ignored-error': 'error',
|
|
67
|
-
'@smarttools/rxjs/no-ignored-notifier': 'error',
|
|
68
|
-
'@smarttools/rxjs/no-ignored-observable': 'error',
|
|
69
|
-
'@smarttools/rxjs/no-ignored-replay-buffer': 'error',
|
|
70
|
-
'@smarttools/rxjs/no-ignored-subscribe': 'error',
|
|
71
|
-
'@smarttools/rxjs/no-ignored-subscription': 'error',
|
|
72
|
-
'@smarttools/rxjs/no-ignored-takewhile-value': 'error',
|
|
73
|
-
'@smarttools/rxjs/no-implicit-any-catch': ['off', {
|
|
74
|
-
allowExplicitAny: false,
|
|
75
|
-
}],
|
|
76
|
-
'@smarttools/rxjs/no-index': 'error',
|
|
77
|
-
'@smarttools/rxjs/no-internal': 'warn',
|
|
78
|
-
'@smarttools/rxjs/no-nested-subscribe': 'error',
|
|
79
|
-
'@smarttools/rxjs/no-redundant-notify': 'error',
|
|
80
|
-
'@smarttools/rxjs/no-sharereplay': 'off',
|
|
81
|
-
'@smarttools/rxjs/no-subclass': 'error',
|
|
82
|
-
'@smarttools/rxjs/no-subject-unsubscribe': 'error',
|
|
83
|
-
'@smarttools/rxjs/no-subject-value': 'error',
|
|
84
|
-
'@smarttools/rxjs/no-subscribe-handlers': 'off',
|
|
85
|
-
'@smarttools/rxjs/no-topromise': 'error',
|
|
86
|
-
'@smarttools/rxjs/no-unbound-methods': 'error',
|
|
87
|
-
'@smarttools/rxjs/no-unsafe-catch': 'error',
|
|
88
|
-
'@smarttools/rxjs/no-unsafe-first': 'error',
|
|
89
|
-
'@smarttools/rxjs/no-unsafe-subject-next': 'error',
|
|
90
|
-
'@smarttools/rxjs/no-unsafe-switchmap': 'error',
|
|
91
|
-
'@smarttools/rxjs/no-unsafe-takeuntil': 'error',
|
|
92
|
-
'@smarttools/rxjs/prefer-observer': 'off',
|
|
93
|
-
'@smarttools/rxjs/suffix-subjects': 'off',
|
|
94
|
-
'@smarttools/rxjs/throw-error': 'error',
|
|
95
|
-
},
|
|
96
|
-
};
|
|
1
|
+
import eslintPluginRxjs from '@smarttools/eslint-plugin-rxjs';
|
|
2
|
+
export const rxjsConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'@smarttools/rxjs': eslintPluginRxjs
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'@smarttools/rxjs/ban-observables': 'error',
|
|
8
|
+
'@smarttools/rxjs/ban-operators': ['error', {
|
|
9
|
+
tap: false
|
|
10
|
+
}],
|
|
11
|
+
'@smarttools/rxjs/finnish': ['error', {
|
|
12
|
+
functions: true,
|
|
13
|
+
methods: true,
|
|
14
|
+
names: {},
|
|
15
|
+
parameters: true,
|
|
16
|
+
properties: true,
|
|
17
|
+
strict: true,
|
|
18
|
+
types: {},
|
|
19
|
+
variables: true
|
|
20
|
+
}],
|
|
21
|
+
'@smarttools/rxjs/just': 'off',
|
|
22
|
+
'@smarttools/rxjs/no-async-subscribe': 'error',
|
|
23
|
+
'@smarttools/rxjs/no-compat': 'error',
|
|
24
|
+
'@smarttools/rxjs/no-connectable': 'error',
|
|
25
|
+
'@smarttools/rxjs/no-create': 'error',
|
|
26
|
+
'@smarttools/rxjs/no-cyclic-action': 'error',
|
|
27
|
+
'@smarttools/rxjs/no-explicit-generics': 'off',
|
|
28
|
+
'@smarttools/rxjs/no-exposed-subjects': 'error',
|
|
29
|
+
'@smarttools/rxjs/no-finnish': 'off',
|
|
30
|
+
'@smarttools/rxjs/no-ignored-error': 'error',
|
|
31
|
+
'@smarttools/rxjs/no-ignored-notifier': 'error',
|
|
32
|
+
'@smarttools/rxjs/no-ignored-observable': 'error',
|
|
33
|
+
'@smarttools/rxjs/no-ignored-replay-buffer': 'error',
|
|
34
|
+
'@smarttools/rxjs/no-ignored-subscribe': 'error',
|
|
35
|
+
'@smarttools/rxjs/no-ignored-subscription': 'error',
|
|
36
|
+
'@smarttools/rxjs/no-ignored-takewhile-value': 'error',
|
|
37
|
+
'@smarttools/rxjs/no-implicit-any-catch': ['off', {
|
|
38
|
+
allowExplicitAny: false
|
|
39
|
+
}],
|
|
40
|
+
'@smarttools/rxjs/no-index': 'error',
|
|
41
|
+
'@smarttools/rxjs/no-internal': 'warn',
|
|
42
|
+
'@smarttools/rxjs/no-nested-subscribe': 'error',
|
|
43
|
+
'@smarttools/rxjs/no-redundant-notify': 'error',
|
|
44
|
+
'@smarttools/rxjs/no-sharereplay': 'off',
|
|
45
|
+
'@smarttools/rxjs/no-subclass': 'error',
|
|
46
|
+
'@smarttools/rxjs/no-subject-unsubscribe': 'error',
|
|
47
|
+
'@smarttools/rxjs/no-subject-value': 'error',
|
|
48
|
+
'@smarttools/rxjs/no-subscribe-handlers': 'off',
|
|
49
|
+
'@smarttools/rxjs/no-topromise': 'error',
|
|
50
|
+
'@smarttools/rxjs/no-unbound-methods': 'error',
|
|
51
|
+
'@smarttools/rxjs/no-unsafe-catch': 'error',
|
|
52
|
+
'@smarttools/rxjs/no-unsafe-first': 'error',
|
|
53
|
+
'@smarttools/rxjs/no-unsafe-subject-next': 'error',
|
|
54
|
+
'@smarttools/rxjs/no-unsafe-switchmap': 'error',
|
|
55
|
+
'@smarttools/rxjs/no-unsafe-takeuntil': 'error',
|
|
56
|
+
'@smarttools/rxjs/prefer-observer': 'off',
|
|
57
|
+
'@smarttools/rxjs/suffix-subjects': 'off',
|
|
58
|
+
'@smarttools/rxjs/throw-error': 'error'
|
|
59
|
+
}
|
|
60
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as eslintPluginSecurity from 'eslint-plugin-security';
|
|
2
1
|
export declare const securityConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
security:
|
|
3
|
+
security: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
5
4
|
};
|
|
6
5
|
rules: {
|
|
7
6
|
'security/detect-bidi-characters': string;
|
package/rules/security/index.js
CHANGED
|
@@ -1,58 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.securityConfig = void 0;
|
|
37
|
-
const eslintPluginSecurity = __importStar(require("eslint-plugin-security"));
|
|
38
|
-
exports.securityConfig = {
|
|
39
|
-
plugins: {
|
|
40
|
-
security: eslintPluginSecurity,
|
|
41
|
-
},
|
|
42
|
-
rules: {
|
|
43
|
-
'security/detect-bidi-characters': 'error',
|
|
44
|
-
'security/detect-buffer-noassert': 'error',
|
|
45
|
-
'security/detect-child-process': 'error',
|
|
46
|
-
'security/detect-disable-mustache-escape': 'error',
|
|
47
|
-
'security/detect-eval-with-expression': 'error',
|
|
48
|
-
'security/detect-new-buffer': 'error',
|
|
49
|
-
'security/detect-no-csrf-before-method-override': 'error',
|
|
50
|
-
'security/detect-non-literal-fs-filename': 'error',
|
|
51
|
-
'security/detect-non-literal-regexp': 'error',
|
|
52
|
-
'security/detect-non-literal-require': 'error',
|
|
53
|
-
'security/detect-object-injection': 'error',
|
|
54
|
-
'security/detect-possible-timing-attacks': 'error',
|
|
55
|
-
'security/detect-pseudoRandomBytes': 'error',
|
|
56
|
-
'security/detect-unsafe-regex': 'error',
|
|
57
|
-
},
|
|
58
|
-
};
|
|
1
|
+
import eslintPluginSecurity from 'eslint-plugin-security';
|
|
2
|
+
export const securityConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
security: eslintPluginSecurity
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'security/detect-bidi-characters': 'error',
|
|
8
|
+
'security/detect-buffer-noassert': 'error',
|
|
9
|
+
'security/detect-child-process': 'error',
|
|
10
|
+
'security/detect-disable-mustache-escape': 'error',
|
|
11
|
+
'security/detect-eval-with-expression': 'error',
|
|
12
|
+
'security/detect-new-buffer': 'error',
|
|
13
|
+
'security/detect-no-csrf-before-method-override': 'error',
|
|
14
|
+
'security/detect-non-literal-fs-filename': 'error',
|
|
15
|
+
'security/detect-non-literal-regexp': 'error',
|
|
16
|
+
'security/detect-non-literal-require': 'error',
|
|
17
|
+
'security/detect-object-injection': 'error',
|
|
18
|
+
'security/detect-possible-timing-attacks': 'error',
|
|
19
|
+
'security/detect-pseudoRandomBytes': 'error',
|
|
20
|
+
'security/detect-unsafe-regex': 'error'
|
|
21
|
+
}
|
|
22
|
+
};
|