@abinnovision/eslint-config-typescript 2.2.2 → 2.2.3
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/CHANGELOG.md +7 -0
- package/dist/index.cjs +78 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +47 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.3](https://github.com/abinnovision/js-commons/compare/eslint-config-typescript-v2.2.2...eslint-config-typescript-v2.2.3) (2025-11-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* trigger synthetic patch release for all packages ([0a42ee3](https://github.com/abinnovision/js-commons/commit/0a42ee36601f88ff232a41a8682266543849b3c6))
|
|
9
|
+
|
|
3
10
|
## [2.2.2](https://github.com/abinnovision/js-commons/compare/eslint-config-typescript-v2.2.1...eslint-config-typescript-v2.2.2) (2025-11-08)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
default: () => src_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
37
|
+
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
38
|
+
var import_config = require("eslint/config");
|
|
39
|
+
var import_typescript = __toESM(require("eslint-config-alloy/typescript.js"), 1);
|
|
40
|
+
var config = (0, import_config.defineConfig)([
|
|
41
|
+
{
|
|
42
|
+
files: ["**/*.{ts,tsx}"],
|
|
43
|
+
plugins: {
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
45
|
+
"@typescript-eslint": import_eslint_plugin.default
|
|
46
|
+
},
|
|
47
|
+
languageOptions: {
|
|
48
|
+
parser: import_parser.default,
|
|
49
|
+
parserOptions: {
|
|
50
|
+
project: "./tsconfig.json"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
rules: {
|
|
54
|
+
/**
|
|
55
|
+
* Use the rules from the base config as defaults.
|
|
56
|
+
*
|
|
57
|
+
* @see https://alloyteam.github.io/eslint-config-alloy/?hideOff=1&rule=typescript
|
|
58
|
+
*/
|
|
59
|
+
...import_typescript.default.rules ?? {},
|
|
60
|
+
/**
|
|
61
|
+
* Enforce to use `return await` for async functions.
|
|
62
|
+
* This rule is set to "always" because it's a good practice to use
|
|
63
|
+
* `return await` for async functions.
|
|
64
|
+
*
|
|
65
|
+
* NOTE: This is overridden from the base config.
|
|
66
|
+
*
|
|
67
|
+
* @see https://typescript-eslint.io/rules/return-await/
|
|
68
|
+
* @see https://stackoverflow.com/questions/43353087/are-there-performance-concerns-with-return-await/70979225#70979225
|
|
69
|
+
*/
|
|
70
|
+
"@typescript-eslint/return-await": ["warn", "always"],
|
|
71
|
+
/**
|
|
72
|
+
* Disable no-unused-vars due to unused-imports plugin
|
|
73
|
+
*/
|
|
74
|
+
"@typescript-eslint/no-unused-vars": "off"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]);
|
|
78
|
+
var src_default = config;
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import TypescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
3
|
+
import TypescriptEslintParser from "@typescript-eslint/parser";
|
|
4
|
+
import { defineConfig } from "eslint/config";
|
|
5
|
+
import AlloyTypescript from "eslint-config-alloy/typescript.js";
|
|
6
|
+
var config = defineConfig([
|
|
7
|
+
{
|
|
8
|
+
files: ["**/*.{ts,tsx}"],
|
|
9
|
+
plugins: {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11
|
+
"@typescript-eslint": TypescriptEslintPlugin
|
|
12
|
+
},
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parser: TypescriptEslintParser,
|
|
15
|
+
parserOptions: {
|
|
16
|
+
project: "./tsconfig.json"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
rules: {
|
|
20
|
+
/**
|
|
21
|
+
* Use the rules from the base config as defaults.
|
|
22
|
+
*
|
|
23
|
+
* @see https://alloyteam.github.io/eslint-config-alloy/?hideOff=1&rule=typescript
|
|
24
|
+
*/
|
|
25
|
+
...AlloyTypescript.rules ?? {},
|
|
26
|
+
/**
|
|
27
|
+
* Enforce to use `return await` for async functions.
|
|
28
|
+
* This rule is set to "always" because it's a good practice to use
|
|
29
|
+
* `return await` for async functions.
|
|
30
|
+
*
|
|
31
|
+
* NOTE: This is overridden from the base config.
|
|
32
|
+
*
|
|
33
|
+
* @see https://typescript-eslint.io/rules/return-await/
|
|
34
|
+
* @see https://stackoverflow.com/questions/43353087/are-there-performance-concerns-with-return-await/70979225#70979225
|
|
35
|
+
*/
|
|
36
|
+
"@typescript-eslint/return-await": ["warn", "always"],
|
|
37
|
+
/**
|
|
38
|
+
* Disable no-unused-vars due to unused-imports plugin
|
|
39
|
+
*/
|
|
40
|
+
"@typescript-eslint/no-unused-vars": "off"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]);
|
|
44
|
+
var src_default = config;
|
|
45
|
+
export {
|
|
46
|
+
src_default as default
|
|
47
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abinnovision/eslint-config-typescript",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"deprecated": "This package has been merged into @abinnovision/eslint-config-base. Please use that package instead.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"npm": true,
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"eslint-config-alloy": "^5.1.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@abinnovision/eslint-config-base": "^3.0.
|
|
57
|
-
"@abinnovision/prettier-config": "^2.1.
|
|
56
|
+
"@abinnovision/eslint-config-base": "^3.0.1",
|
|
57
|
+
"@abinnovision/prettier-config": "^2.1.5",
|
|
58
58
|
"eslint": "^9.39.1",
|
|
59
59
|
"prettier": "^3.4.2",
|
|
60
60
|
"tsup": "^8.3.6",
|