@perfective/eslint-config 0.27.1 → 0.28.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/README.adoc +18 -19
- package/README.md +21 -24
- package/index.js +151 -121
- package/package.json +13 -15
- package/rules/array-func/index.js +40 -4
- package/rules/cypress/index.js +52 -12
- package/rules/eslint/index.js +7 -6
- package/rules/eslint/layout-formatting.js +65 -65
- package/rules/eslint/possible-problems.js +89 -89
- package/rules/eslint/suggestions.js +178 -178
- package/rules/eslint-comments/best-practices.js +9 -9
- package/rules/eslint-comments/index.js +43 -8
- package/rules/eslint-comments/stylistic-issues.js +16 -16
- package/rules/import/helpful-warnings.js +11 -11
- package/rules/import/index.js +12 -10
- package/rules/import/module-systems.js +11 -11
- package/rules/import/static-analysis.js +27 -27
- package/rules/import/style-guide.js +34 -34
- package/rules/jest/index.js +53 -78
- package/rules/jest/typescript-eslint.js +6 -6
- package/rules/jest-dom/index.js +40 -4
- package/rules/jsdoc/index.js +42 -4
- package/rules/n/index.js +40 -4
- package/rules/prefer-arrow/index.js +40 -4
- package/rules/promise/index.js +54 -7
- package/rules/rxjs/index.js +40 -4
- package/rules/security/index.js +40 -4
- package/rules/simple-import-sort/index.js +41 -4
- package/rules/stylistic/js/index.js +40 -4
- package/rules/stylistic/jsx/index.js +41 -5
- package/rules/stylistic/plus/index.js +40 -4
- package/rules/stylistic/ts/index.js +40 -4
- package/rules/testing-library/index.js +40 -4
- package/rules/typescript-eslint/extension-rules.js +114 -114
- package/rules/typescript-eslint/index.js +43 -8
- package/rules/typescript-eslint/supported-rules.js +315 -314
- package/rules/unicorn/index.js +40 -4
- package/rules/sonarjs/bug-detection.js +0 -15
- package/rules/sonarjs/code-smell-detection.js +0 -27
- package/rules/sonarjs/index.js +0 -10
|
@@ -1,9 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.simpleImportSortConfig = void 0;
|
|
37
|
+
const eslintPluginSimpleImportSort = __importStar(require("eslint-plugin-simple-import-sort"));
|
|
2
38
|
const imports_1 = require("./rules/imports");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
39
|
+
exports.simpleImportSortConfig = {
|
|
40
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
41
|
+
plugins: {
|
|
42
|
+
'simple-import-sort': eslintPluginSimpleImportSort,
|
|
43
|
+
},
|
|
7
44
|
rules: {
|
|
8
45
|
'simple-import-sort/exports': 'warn',
|
|
9
46
|
'simple-import-sort/imports': ['warn', (0, imports_1.simpleImportSortImports)()],
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.stylisticJsConfig = void 0;
|
|
37
|
+
const eslintPluginStylisticJs = __importStar(require("@stylistic/eslint-plugin-js"));
|
|
38
|
+
exports.stylisticJsConfig = {
|
|
39
|
+
plugins: {
|
|
40
|
+
'@stylistic/js': eslintPluginStylisticJs,
|
|
41
|
+
},
|
|
6
42
|
rules: {
|
|
7
43
|
'@stylistic/js/array-bracket-newline': ['warn', 'consistent'],
|
|
8
44
|
'@stylistic/js/array-bracket-spacing': ['warn', 'never'],
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.stylisticJsxConfig = void 0;
|
|
37
|
+
const eslintPluginStylisticJsx = __importStar(require("@stylistic/eslint-plugin-jsx"));
|
|
38
|
+
exports.stylisticJsxConfig = {
|
|
39
|
+
plugins: {
|
|
40
|
+
'@stylistic/jsx': eslintPluginStylisticJsx,
|
|
41
|
+
},
|
|
6
42
|
rules: {
|
|
7
43
|
'@stylistic/jsx/jsx-child-element-spacing': 'error',
|
|
8
44
|
'@stylistic/jsx/jsx-closing-bracket-location': ['warn', {
|
|
@@ -41,7 +77,7 @@ module.exports = {
|
|
|
41
77
|
'@stylistic/jsx/jsx-one-expression-per-line': ['warn', {
|
|
42
78
|
allow: 'single-child',
|
|
43
79
|
}],
|
|
44
|
-
'@stylistic/jsx/pascal-case': ['error', {
|
|
80
|
+
'@stylistic/jsx/jsx-pascal-case': ['error', {
|
|
45
81
|
allowAllCaps: false,
|
|
46
82
|
allowLeadingUnderscore: false,
|
|
47
83
|
allowNamespace: false,
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.stylisticPlusConfig = void 0;
|
|
37
|
+
const eslintPluginStylisticPlus = __importStar(require("@stylistic/eslint-plugin-plus"));
|
|
38
|
+
exports.stylisticPlusConfig = {
|
|
39
|
+
plugins: {
|
|
40
|
+
'@stylistic/plus': eslintPluginStylisticPlus,
|
|
41
|
+
},
|
|
6
42
|
rules: {
|
|
7
43
|
'@stylistic/plus/curly-newline': ['warn', {
|
|
8
44
|
minElements: 1,
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.stylisticTsConfig = void 0;
|
|
37
|
+
const eslintPluginStylisticTs = __importStar(require("@stylistic/eslint-plugin-ts"));
|
|
38
|
+
exports.stylisticTsConfig = {
|
|
39
|
+
plugins: {
|
|
40
|
+
'@stylistic/ts': eslintPluginStylisticTs,
|
|
41
|
+
},
|
|
6
42
|
rules: {
|
|
7
43
|
'@stylistic/js/block-spacing': 'off',
|
|
8
44
|
'@stylistic/ts/block-spacing': ['warn', 'always'],
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.testingLibraryConfig = void 0;
|
|
37
|
+
const eslintPluginTestingLibrary = __importStar(require("eslint-plugin-testing-library"));
|
|
38
|
+
exports.testingLibraryConfig = {
|
|
39
|
+
plugins: {
|
|
40
|
+
'testing-library': eslintPluginTestingLibrary,
|
|
41
|
+
},
|
|
6
42
|
rules: {
|
|
7
43
|
'testing-library/await-async-events': 'off',
|
|
8
44
|
'testing-library/await-async-queries': 'error',
|
|
@@ -1,116 +1,116 @@
|
|
|
1
1
|
"use strict";
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extensionRules = void 0;
|
|
4
|
+
exports.extensionRules = {
|
|
5
|
+
'block-spacing': 'off',
|
|
6
|
+
'@typescript-eslint/block-spacing': 'off',
|
|
7
|
+
'brace-style': 'off',
|
|
8
|
+
'@typescript-eslint/brace-style': 'off',
|
|
9
|
+
'class-methods-use-this': 'off',
|
|
10
|
+
'@typescript-eslint/class-methods-use-this': 'off',
|
|
11
|
+
'comma-dangle': 'off',
|
|
12
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
13
|
+
'comma-spacing': 'off',
|
|
14
|
+
'@typescript-eslint/comma-spacing': 'off',
|
|
15
|
+
'consistent-return': 'off',
|
|
16
|
+
'@typescript-eslint/consistent-return': 'error',
|
|
17
|
+
'default-param-last': 'off',
|
|
18
|
+
'@typescript-eslint/default-param-last': 'error',
|
|
19
|
+
'dot-notation': 'off',
|
|
20
|
+
'@typescript-eslint/dot-notation': ['warn', {
|
|
21
|
+
allowKeywords: true,
|
|
22
|
+
allowPrivateClassPropertyAccess: false,
|
|
23
|
+
allowProtectedClassPropertyAccess: false,
|
|
24
|
+
}],
|
|
25
|
+
'func-call-spacing': 'off',
|
|
26
|
+
'@typescript-eslint/func-call-spacing': 'off',
|
|
27
|
+
'indent': 'off',
|
|
28
|
+
'@typescript-eslint/indent': 'off',
|
|
29
|
+
'init-declarations': 'off',
|
|
30
|
+
'@typescript-eslint/init-declarations': ['error', 'always'],
|
|
31
|
+
'key-spacing': 'off',
|
|
32
|
+
'@typescript-eslint/key-spacing': 'off',
|
|
33
|
+
'keyword-spacing': 'off',
|
|
34
|
+
'@typescript-eslint/keyword-spacing': 'off',
|
|
35
|
+
'lines-around-comment': 'off',
|
|
36
|
+
'@typescript-eslint/lines-around-comment': 'off',
|
|
37
|
+
'lines-between-class-members': 'off',
|
|
38
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
39
|
+
'no-array-constructor': 'off',
|
|
40
|
+
'@typescript-eslint/no-array-constructor': 'warn',
|
|
41
|
+
'no-dupe-class-members': 'off',
|
|
42
|
+
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
43
|
+
'no-empty-function': 'off',
|
|
44
|
+
'@typescript-eslint/no-empty-function': ['error', {
|
|
45
|
+
allow: ['protected-constructors', 'private-constructors'],
|
|
46
|
+
}],
|
|
47
|
+
'no-extra-parens': 'off',
|
|
48
|
+
'@typescript-eslint/no-extra-parens': 'off',
|
|
49
|
+
'no-extra-semi': 'off',
|
|
50
|
+
'@typescript-eslint/no-extra-semi': 'off',
|
|
51
|
+
'no-implied-eval': 'off',
|
|
52
|
+
'@typescript-eslint/no-implied-eval': 'error',
|
|
53
|
+
'no-invalid-this': 'off',
|
|
54
|
+
'@typescript-eslint/no-invalid-this': 'error',
|
|
55
|
+
'no-loop-func': 'off',
|
|
56
|
+
'@typescript-eslint/no-loop-func': 'error',
|
|
57
|
+
'@typescript-eslint/no-loss-of-precision': 'off',
|
|
58
|
+
'no-magic-numbers': 'off',
|
|
59
|
+
'@typescript-eslint/no-magic-numbers': 'off',
|
|
60
|
+
'no-redeclare': 'off',
|
|
61
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
62
|
+
'no-restricted-imports': 'off',
|
|
63
|
+
'@typescript-eslint/no-restricted-imports': ['error', {}],
|
|
64
|
+
'no-shadow': 'off',
|
|
65
|
+
'@typescript-eslint/no-shadow': 'off',
|
|
66
|
+
'no-throw-literal': 'off',
|
|
67
|
+
'@typescript-eslint/only-throw-error': ['error', {
|
|
68
|
+
allowThrowingAny: false,
|
|
69
|
+
allowThrowingUnknown: false,
|
|
70
|
+
}],
|
|
71
|
+
'no-unused-expressions': 'off',
|
|
72
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
73
|
+
'no-unused-vars': 'off',
|
|
74
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
75
|
+
args: 'after-used',
|
|
76
|
+
argsIgnorePattern: '^_',
|
|
77
|
+
caughtErrors: 'all',
|
|
78
|
+
destructuredArrayIgnorePattern: '^_',
|
|
79
|
+
ignoreRestSiblings: false,
|
|
80
|
+
vars: 'all',
|
|
81
|
+
}],
|
|
82
|
+
'no-use-before-define': 'off',
|
|
83
|
+
'@typescript-eslint/no-use-before-define': ['error', {
|
|
84
|
+
functions: false,
|
|
85
|
+
classes: false,
|
|
86
|
+
variables: false,
|
|
87
|
+
allowNamedExports: false,
|
|
88
|
+
enums: false,
|
|
89
|
+
typedefs: false,
|
|
90
|
+
ignoreTypeReferences: false,
|
|
91
|
+
}],
|
|
92
|
+
'no-useless-constructor': 'off',
|
|
93
|
+
'@typescript-eslint/no-useless-constructor': 'error',
|
|
94
|
+
'object-curly-spacing': 'off',
|
|
95
|
+
'@typescript-eslint/object-curly-spacing': 'off',
|
|
96
|
+
'padding-line-between-statements': 'off',
|
|
97
|
+
'@typescript-eslint/padding-line-between-statements': 'off',
|
|
98
|
+
'prefer-destructuring': 'off',
|
|
99
|
+
'@typescript-eslint/prefer-destructuring': 'off',
|
|
100
|
+
'prefer-promise-reject-errors': 'off',
|
|
101
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'error',
|
|
102
|
+
'quotes': 'off',
|
|
103
|
+
'@typescript-eslint/quotes': 'off',
|
|
104
|
+
'require-await': 'off',
|
|
105
|
+
'@typescript-eslint/require-await': 'error',
|
|
106
|
+
'no-return-await': 'off',
|
|
107
|
+
'@typescript-eslint/return-await': ['warn', 'error-handling-correctness-only'],
|
|
108
|
+
'semi': 'off',
|
|
109
|
+
'@typescript-eslint/semi': 'off',
|
|
110
|
+
'space-before-blocks': 'off',
|
|
111
|
+
'@typescript-eslint/space-before-blocks': 'off',
|
|
112
|
+
'space-before-function-paren': 'off',
|
|
113
|
+
'@typescript-eslint/space-before-function-paren': 'off',
|
|
114
|
+
'space-infix-ops': 'off',
|
|
115
|
+
'@typescript-eslint/space-infix-ops': 'off',
|
|
116
116
|
};
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
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.typescriptEslintConfig = void 0;
|
|
37
|
+
const tsEslint = __importStar(require("typescript-eslint"));
|
|
38
|
+
const extension_rules_1 = require("./extension-rules");
|
|
39
|
+
const supported_rules_1 = require("./supported-rules");
|
|
40
|
+
exports.typescriptEslintConfig = {
|
|
41
|
+
plugins: {
|
|
42
|
+
'@typescript-eslint': tsEslint.plugin,
|
|
43
|
+
},
|
|
44
|
+
rules: Object.assign(Object.assign({}, supported_rules_1.supportedRules), extension_rules_1.extensionRules),
|
|
10
45
|
};
|