@abinnovision/eslint-config-typescript 2.0.0 → 2.1.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +72 -0
- package/dist/{index.d.mts → index.d.cts} +3 -6
- package/dist/index.d.ts +3 -6
- package/dist/index.js +7 -28
- package/package.json +16 -15
- package/dist/index.mjs +0 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.1.0](https://github.com/abinnovision/js-commons/compare/eslint-config-typescript-v2.0.0...eslint-config-typescript-v2.1.0) (2024-08-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* migrate to esm ([#278](https://github.com/abinnovision/js-commons/issues/278)) ([fed850d](https://github.com/abinnovision/js-commons/commit/fed850d979f7ba83fae75adadcfd0024f2acd242))
|
|
9
|
+
|
|
3
10
|
## [2.0.0](https://github.com/abinnovision/js-commons/compare/eslint-config-typescript-v1.2.0...eslint-config-typescript-v2.0.0) (2023-11-03)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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_typescript = __toESM(require("eslint-config-alloy/typescript.js"), 1);
|
|
39
|
+
var config = [
|
|
40
|
+
{
|
|
41
|
+
files: ["**/*.{ts,tsx}"],
|
|
42
|
+
plugins: {
|
|
43
|
+
"@typescript-eslint": import_eslint_plugin.default
|
|
44
|
+
},
|
|
45
|
+
languageOptions: {
|
|
46
|
+
parser: import_parser.default,
|
|
47
|
+
parserOptions: {
|
|
48
|
+
project: "./tsconfig.json"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
rules: {
|
|
52
|
+
/**
|
|
53
|
+
* Use the rules from the base config as defaults.
|
|
54
|
+
*
|
|
55
|
+
* @see https://alloyteam.github.io/eslint-config-alloy/?hideOff=1&rule=typescript
|
|
56
|
+
*/
|
|
57
|
+
...import_typescript.default.rules ?? {},
|
|
58
|
+
/**
|
|
59
|
+
* Enforce to use `return await` for async functions.
|
|
60
|
+
* This rule is set to "always" because it's a good practice to use
|
|
61
|
+
* `return await` for async functions.
|
|
62
|
+
*
|
|
63
|
+
* NOTE: This is overridden from the base config.
|
|
64
|
+
*
|
|
65
|
+
* @see https://typescript-eslint.io/rules/return-await/
|
|
66
|
+
* @see https://stackoverflow.com/questions/43353087/are-there-performance-concerns-with-return-await/70979225#70979225
|
|
67
|
+
*/
|
|
68
|
+
"@typescript-eslint/return-await": ["warn", "always"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
var src_default = config;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import TypescriptEslintParser from '@typescript-eslint/parser';
|
|
2
2
|
|
|
3
3
|
declare const config: {
|
|
4
4
|
files: string[];
|
|
5
5
|
plugins: {
|
|
6
|
-
"@typescript-eslint":
|
|
7
|
-
configs: Record<string, TSESLint.Linter.Config>;
|
|
8
|
-
rules: _typescript_eslint_eslint_plugin_rules.TypeScriptESLintRules;
|
|
9
|
-
};
|
|
6
|
+
"@typescript-eslint": any;
|
|
10
7
|
};
|
|
11
8
|
languageOptions: {
|
|
12
|
-
parser:
|
|
9
|
+
parser: typeof TypescriptEslintParser;
|
|
13
10
|
parserOptions: {
|
|
14
11
|
project: string;
|
|
15
12
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import TypescriptEslintParser from '@typescript-eslint/parser';
|
|
2
2
|
|
|
3
3
|
declare const config: {
|
|
4
4
|
files: string[];
|
|
5
5
|
plugins: {
|
|
6
|
-
"@typescript-eslint":
|
|
7
|
-
configs: Record<string, TSESLint.Linter.Config>;
|
|
8
|
-
rules: _typescript_eslint_eslint_plugin_rules.TypeScriptESLintRules;
|
|
9
|
-
};
|
|
6
|
+
"@typescript-eslint": any;
|
|
10
7
|
};
|
|
11
8
|
languageOptions: {
|
|
12
|
-
parser:
|
|
9
|
+
parser: typeof TypescriptEslintParser;
|
|
13
10
|
parserOptions: {
|
|
14
11
|
project: string;
|
|
15
12
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,7 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
|
|
25
1
|
// src/index.ts
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
import TypescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
3
|
+
import TypescriptEslintParser from "@typescript-eslint/parser";
|
|
4
|
+
import AlloyTypescript from "eslint-config-alloy/typescript.js";
|
|
29
5
|
var config = [
|
|
30
6
|
{
|
|
31
7
|
files: ["**/*.{ts,tsx}"],
|
|
@@ -59,4 +35,7 @@ var config = [
|
|
|
59
35
|
}
|
|
60
36
|
}
|
|
61
37
|
];
|
|
62
|
-
|
|
38
|
+
var src_default = config;
|
|
39
|
+
export {
|
|
40
|
+
src_default as default
|
|
41
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abinnovision/eslint-config-typescript",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"repository": {
|
|
5
6
|
"url": "https://github.com/abinnovision/js-commons"
|
|
6
7
|
},
|
|
@@ -12,13 +13,13 @@
|
|
|
12
13
|
},
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
15
|
-
"import": "./dist/index.
|
|
16
|
-
"require": "./dist/index.
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
17
18
|
"types": "./dist/index.d.ts"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
|
-
"main": "./dist/index.
|
|
21
|
-
"module": "./dist/index.
|
|
21
|
+
"main": "./dist/index.cjs",
|
|
22
|
+
"module": "./dist/index.js",
|
|
22
23
|
"types": "./dist/index.d.ts",
|
|
23
24
|
"files": [
|
|
24
25
|
"dist/"
|
|
@@ -41,21 +42,21 @@
|
|
|
41
42
|
},
|
|
42
43
|
"prettier": "@abinnovision/prettier-config",
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
45
|
-
"@typescript-eslint/parser": "^
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
46
47
|
"eslint-config-alloy": "^5.1.2"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@abinnovision/prettier-config": "^2.
|
|
50
|
-
"@types/eslint": "^
|
|
51
|
-
"eslint": "^8.
|
|
52
|
-
"globals": "^
|
|
53
|
-
"prettier": "^3.
|
|
54
|
-
"tsup": "^
|
|
55
|
-
"typescript": "^5.
|
|
50
|
+
"@abinnovision/prettier-config": "^2.1.0",
|
|
51
|
+
"@types/eslint": "^9.6.0",
|
|
52
|
+
"eslint": "^9.8.0",
|
|
53
|
+
"globals": "^15.9.0",
|
|
54
|
+
"prettier": "^3.3.3",
|
|
55
|
+
"tsup": "^8.2.4",
|
|
56
|
+
"typescript": "^5.5.4"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"eslint": "^8.24.0"
|
|
59
|
+
"eslint": "^8.24.0 || ^9.0.0"
|
|
59
60
|
},
|
|
60
61
|
"packageManager": "yarn@3.4.1"
|
|
61
62
|
}
|
package/dist/index.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
// src/index.ts
|
|
7
|
-
import * as TypescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
8
|
-
import * as TypescriptEslintParser from "@typescript-eslint/parser";
|
|
9
|
-
import * as AlloyTypescript from "eslint-config-alloy/typescript";
|
|
10
|
-
var require_src = __commonJS({
|
|
11
|
-
"src/index.ts"(exports, module) {
|
|
12
|
-
var config = [
|
|
13
|
-
{
|
|
14
|
-
files: ["**/*.{ts,tsx}"],
|
|
15
|
-
plugins: {
|
|
16
|
-
"@typescript-eslint": TypescriptEslintPlugin
|
|
17
|
-
},
|
|
18
|
-
languageOptions: {
|
|
19
|
-
parser: TypescriptEslintParser,
|
|
20
|
-
parserOptions: {
|
|
21
|
-
project: "./tsconfig.json"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
rules: {
|
|
25
|
-
/**
|
|
26
|
-
* Use the rules from the base config as defaults.
|
|
27
|
-
*
|
|
28
|
-
* @see https://alloyteam.github.io/eslint-config-alloy/?hideOff=1&rule=typescript
|
|
29
|
-
*/
|
|
30
|
-
...AlloyTypescript.rules ?? {},
|
|
31
|
-
/**
|
|
32
|
-
* Enforce to use `return await` for async functions.
|
|
33
|
-
* This rule is set to "always" because it's a good practice to use
|
|
34
|
-
* `return await` for async functions.
|
|
35
|
-
*
|
|
36
|
-
* NOTE: This is overridden from the base config.
|
|
37
|
-
*
|
|
38
|
-
* @see https://typescript-eslint.io/rules/return-await/
|
|
39
|
-
* @see https://stackoverflow.com/questions/43353087/are-there-performance-concerns-with-return-await/70979225#70979225
|
|
40
|
-
*/
|
|
41
|
-
"@typescript-eslint/return-await": ["warn", "always"]
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
];
|
|
45
|
-
module.exports = config;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export default require_src();
|