@andrewt03/eslint-typescript-rules 0.0.6 → 0.0.8

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.
@@ -0,0 +1,10 @@
1
+ declare class Class {
2
+ private _id;
3
+ name: string;
4
+ isCool: boolean;
5
+ constructor(_id: number, name: string, isCool: boolean);
6
+ get id(): number;
7
+ toString(): string;
8
+ }
9
+
10
+ export { Class };
@@ -0,0 +1,10 @@
1
+ declare class Class {
2
+ private _id;
3
+ name: string;
4
+ isCool: boolean;
5
+ constructor(_id: number, name: string, isCool: boolean);
6
+ get id(): number;
7
+ toString(): string;
8
+ }
9
+
10
+ export { Class };
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var class_exports = {};
20
+ __export(class_exports, {
21
+ Class: () => Class
22
+ });
23
+ module.exports = __toCommonJS(class_exports);
24
+ class Class {
25
+ _id;
26
+ name;
27
+ isCool;
28
+ constructor(_id, name, isCool) {
29
+ this._id = _id;
30
+ this.name = name;
31
+ this.isCool = isCool;
32
+ }
33
+ get id() {
34
+ return this._id;
35
+ }
36
+ toString() {
37
+ return `Class: { id: ${this.id}, name: ${this.name}, isCool: ${this.isCool} }`;
38
+ }
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ Class
43
+ });
@@ -0,0 +1,19 @@
1
+ class Class {
2
+ _id;
3
+ name;
4
+ isCool;
5
+ constructor(_id, name, isCool) {
6
+ this._id = _id;
7
+ this.name = name;
8
+ this.isCool = isCool;
9
+ }
10
+ get id() {
11
+ return this._id;
12
+ }
13
+ toString() {
14
+ return `Class: { id: ${this.id}, name: ${this.name}, isCool: ${this.isCool} }`;
15
+ }
16
+ }
17
+ export {
18
+ Class
19
+ };
@@ -16,8 +16,6 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/sub/hello.ts
21
19
  var hello_exports = {};
22
20
  __export(hello_exports, {
23
21
  sayHello: () => sayHello
@@ -1,4 +1,3 @@
1
- // src/sub/hello.ts
2
1
  function sayHello(name) {
3
2
  return `Hello, ${name}`;
4
3
  }
@@ -0,0 +1,2 @@
1
+ export { sayHello } from './hello/hello.mjs';
2
+ export { addTwoNumbers, isEven } from './number/number.mjs';
@@ -0,0 +1,2 @@
1
+ export { sayHello } from './hello/hello.js';
2
+ export { addTwoNumbers, isEven } from './number/number.js';
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var index_exports = {};
17
+ module.exports = __toCommonJS(index_exports);
18
+ __reExport(index_exports, require("./hello/hello"), module.exports);
19
+ __reExport(index_exports, require("./number/number"), module.exports);
20
+ // Annotate the CommonJS export names for ESM import in node:
21
+ 0 && (module.exports = {
22
+ ...require("./hello/hello"),
23
+ ...require("./number/number")
24
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./hello/hello";
2
+ export * from "./number/number";
@@ -0,0 +1,4 @@
1
+ declare function isEven(n: number): boolean;
2
+ declare function addTwoNumbers(a: number, b: number): number;
3
+
4
+ export { addTwoNumbers, isEven };
@@ -0,0 +1,4 @@
1
+ declare function isEven(n: number): boolean;
2
+ declare function addTwoNumbers(a: number, b: number): number;
3
+
4
+ export { addTwoNumbers, isEven };
@@ -16,17 +16,20 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/number.ts
21
19
  var number_exports = {};
22
20
  __export(number_exports, {
23
- addTwoNumbers: () => addTwoNumbers
21
+ addTwoNumbers: () => addTwoNumbers,
22
+ isEven: () => isEven
24
23
  });
25
24
  module.exports = __toCommonJS(number_exports);
25
+ function isEven(n) {
26
+ return n % 2 === 0;
27
+ }
26
28
  function addTwoNumbers(a, b) {
27
29
  return a + b;
28
30
  }
29
31
  // Annotate the CommonJS export names for ESM import in node:
30
32
  0 && (module.exports = {
31
- addTwoNumbers
33
+ addTwoNumbers,
34
+ isEven
32
35
  });
@@ -0,0 +1,10 @@
1
+ function isEven(n) {
2
+ return n % 2 === 0;
3
+ }
4
+ function addTwoNumbers(a, b) {
5
+ return a + b;
6
+ }
7
+ export {
8
+ addTwoNumbers,
9
+ isEven
10
+ };
package/package.json CHANGED
@@ -1,30 +1,33 @@
1
1
  {
2
2
  "name": "@andrewt03/eslint-typescript-rules",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Recommended ESLint Rules for general TypeScript, Node.js/Express.js, Angular, and React.js Projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
8
  "author": "Andrew Tran",
9
- "license": "ISC",
9
+ "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/AndrewTran03/AndrewTran03-ESLint-TypeScript-Rules.git"
13
13
  },
14
14
  "scripts": {
15
- "build": "tsup \"src/**/*.ts*\"",
16
- "changeset:init": "changeset init",
17
- "changeset:create": "changeset",
18
- "changeset:version": "changeset version",
15
+ "build": "tsup",
19
16
  "release": "npm run build && changeset publish",
20
17
  "publish": "npm publish --access public",
21
18
  "lint": "tsc",
22
19
  "prettier": "prettier --write .",
23
20
  "test": "echo \"Error: no test specified\" && exit 1"
24
21
  },
25
- "keywords": ["ESLint", "TypeScript", "Node.js", "Express.js", "Angular", "React.js"],
22
+ "keywords": [
23
+ "ESLint",
24
+ "TypeScript",
25
+ "Node.js",
26
+ "Express.js",
27
+ "Angular",
28
+ "React.js"
29
+ ],
26
30
  "devDependencies": {
27
- "@changesets/cli": "^2.27.11",
28
31
  "prettier": "^3.4.2",
29
32
  "tsup": "^8.3.5",
30
33
  "typescript": "^5.7.2"
package/dist/number.d.mts DELETED
@@ -1,3 +0,0 @@
1
- declare function addTwoNumbers(a: number, b: number): number;
2
-
3
- export { addTwoNumbers };
package/dist/number.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare function addTwoNumbers(a: number, b: number): number;
2
-
3
- export { addTwoNumbers };
package/dist/number.mjs DELETED
@@ -1,7 +0,0 @@
1
- // src/number.ts
2
- function addTwoNumbers(a, b) {
3
- return a + b;
4
- }
5
- export {
6
- addTwoNumbers
7
- };
File without changes
File without changes