@abinnovision/eslint-config-typescript 2.0.0 → 2.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.1](https://github.com/abinnovision/js-commons/compare/eslint-config-typescript-v2.1.0...eslint-config-typescript-v2.1.1) (2024-10-16)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * migrate to Linter.Config type ([#340](https://github.com/abinnovision/js-commons/issues/340)) ([30a1c19](https://github.com/abinnovision/js-commons/commit/30a1c19c3a2f4c2b94e6086486951145b399e15d))
9
+ * only support eslint v9 ([#345](https://github.com/abinnovision/js-commons/issues/345)) ([7425fdc](https://github.com/abinnovision/js-commons/commit/7425fdc9c2d8912988697ab07b9a8f42d96786d4))
10
+ * use spaces for markdown files ([#349](https://github.com/abinnovision/js-commons/issues/349)) ([eeb8b33](https://github.com/abinnovision/js-commons/commit/eeb8b335916602b55ca02cfdea352bc296fa7ffb))
11
+
12
+ ## [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)
13
+
14
+
15
+ ### Features
16
+
17
+ * migrate to esm ([#278](https://github.com/abinnovision/js-commons/issues/278)) ([fed850d](https://github.com/abinnovision/js-commons/commit/fed850d979f7ba83fae75adadcfd0024f2acd242))
18
+
3
19
  ## [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
20
 
5
21
 
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # @abinnovision/eslint-config-typescript
2
2
 
3
3
  ESLint config specifically for Typescript related projects. This config **must
4
- be used in conjunction with
5
- the [@abinnovision/eslint-config-base](https://github.com/abinnovision/js-commons/tree/master/packages/eslint-config-base)
6
- ESLint config**. This config is based on
7
- the [AlloyTeam ESLint Config](https://github.com/AlloyTeam/eslint-config-alloy)
8
- with some additional goodies on top.
4
+ be used in conjunction with the
5
+ [@abinnovision/eslint-config-base](https://github.com/abinnovision/js-commons/tree/master/packages/eslint-config-base)
6
+ ESLint config**. This config is based on the
7
+ [AlloyTeam ESLint Config](https://github.com/AlloyTeam/eslint-config-alloy) with
8
+ some additional goodies on top.
9
9
 
10
10
  ## Installation
11
11
 
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 * as _typescript_eslint_eslint_plugin_rules from '@typescript-eslint/eslint-plugin/rules';
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: any;
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 * as _typescript_eslint_eslint_plugin_rules from '@typescript-eslint/eslint-plugin/rules';
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: any;
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
- var TypescriptEslintPlugin = __toESM(require("@typescript-eslint/eslint-plugin"));
27
- var TypescriptEslintParser = __toESM(require("@typescript-eslint/parser"));
28
- var AlloyTypescript = __toESM(require("eslint-config-alloy/typescript"));
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
- module.exports = config;
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.0.0",
3
+ "version": "2.1.1",
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.mjs",
16
- "require": "./dist/index.js",
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.js",
21
- "module": "./dist/index.mjs",
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,20 @@
41
42
  },
42
43
  "prettier": "@abinnovision/prettier-config",
43
44
  "dependencies": {
44
- "@typescript-eslint/eslint-plugin": "^6.9.0",
45
- "@typescript-eslint/parser": "^6.9.0",
45
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
46
+ "@typescript-eslint/parser": "^8.8.1",
46
47
  "eslint-config-alloy": "^5.1.2"
47
48
  },
48
49
  "devDependencies": {
49
- "@abinnovision/prettier-config": "^2.0.0",
50
- "@types/eslint": "^8.44.6",
51
- "eslint": "^8.52.0",
52
- "globals": "^13.23.0",
53
- "prettier": "^3.0.3",
54
- "tsup": "^7.2.0",
55
- "typescript": "^5.2.2"
50
+ "@abinnovision/prettier-config": "^2.1.3",
51
+ "@types/eslint": "^9.6.1",
52
+ "eslint": "^9.12.0",
53
+ "globals": "^15.11.0",
54
+ "prettier": "^3.3.3",
55
+ "tsup": "^8.3.0",
56
+ "typescript": "^5.6.3"
56
57
  },
57
58
  "peerDependencies": {
58
- "eslint": "^8.24.0"
59
- },
60
- "packageManager": "yarn@3.4.1"
59
+ "eslint": "^9.0.0"
60
+ }
61
61
  }
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();