@simtlix/simfinity-js 1.1.0 → 1.3.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.
@@ -0,0 +1,63 @@
1
+ import globals from "globals";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import js from "@eslint/js";
5
+ import { FlatCompat } from "@eslint/eslintrc";
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
9
+ const compat = new FlatCompat({
10
+ baseDirectory: __dirname,
11
+ recommendedConfig: js.configs.recommended,
12
+ allConfig: js.configs.all
13
+ });
14
+
15
+ export default [
16
+ {
17
+ ignores: ["node_modules/*", "data/*", "eslint.config.mjs"],
18
+ },
19
+ ...compat.extends("airbnb-base"),
20
+ {
21
+ files: ["**/*.js"],
22
+ languageOptions: {
23
+ globals: {
24
+ ...globals.commonjs,
25
+ ...globals.node,
26
+ ...globals.jest,
27
+ },
28
+
29
+ ecmaVersion: 2024,
30
+ sourceType: "commonjs",
31
+ },
32
+
33
+ rules: {
34
+ "default-case": "off",
35
+ "max-len": 0,
36
+ "no-console": "off",
37
+ "no-underscore-dangle": "off",
38
+ "no-await-in-loop": "off",
39
+
40
+ "no-param-reassign": ["error", {
41
+ props: false,
42
+ }],
43
+
44
+ "function-paren-newline": "off",
45
+ "function-call-argument-newline": "off",
46
+
47
+ "no-restricted-syntax": ["error", {
48
+ selector: "ForInStatement",
49
+ message: "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
50
+ }, {
51
+ selector: "LabeledStatement",
52
+ message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
53
+ }, {
54
+ selector: "WithStatement",
55
+ message: "`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
56
+ }],
57
+
58
+ "import/no-unresolved": ["error", {
59
+ ignore: ["graphql", "mongoose"],
60
+ }],
61
+ },
62
+ },
63
+ ];
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "@simtlix/simfinity-js",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
- "test": "echo \"No test specified\"",
7
+ "test": "jest",
8
+ "test:watch": "jest --watch",
9
+ "test:coverage": "jest --coverage",
8
10
  "lint": "eslint '**/*.js'",
9
11
  "lint-fix": "eslint --fix '**/*.js'"
10
12
  },
13
+ "engines": {
14
+ "node": ">=18.18.0"
15
+ },
11
16
  "author": "Simtlix",
12
17
  "license": "Apache-2.0",
13
18
  "repository": {
@@ -16,18 +21,37 @@
16
21
  },
17
22
  "peerDependencies": {
18
23
  "graphql": "^14.7.0",
19
- "mongoose": "^5.12.1"
24
+ "mongoose": "^8.15.1"
20
25
  },
21
26
  "devDependencies": {
22
- "eslint": "^7.7.0",
23
- "eslint-config-airbnb-base": "^14.2.0",
24
- "eslint-plugin-import": "^2.22.0",
25
- "ghooks": "^2.0.4"
27
+ "@eslint/compat": "^1.2.0",
28
+ "@eslint/eslintrc": "^3.1.0",
29
+ "@eslint/js": "^9.30.1",
30
+ "eslint": "^9.30.1",
31
+ "eslint-config-airbnb-base": "^15.0.0",
32
+ "eslint-plugin-import": "^2.32.0",
33
+ "ghooks": "^2.0.4",
34
+ "globals": "^16.3.0",
35
+ "jest": "^29.0.0"
26
36
  },
27
37
  "config": {
28
38
  "ghooks": {
29
39
  "pre-commit": "npm run lint || npm run lint-fix"
30
40
  },
31
41
  "owner": "simtlix"
42
+ },
43
+ "optionalDependencies": {
44
+ "graphql": "^14.7.0",
45
+ "mongoose": "^8.15.1"
46
+ },
47
+ "jest": {
48
+ "testEnvironment": "node",
49
+ "testMatch": [
50
+ "**/tests/**/*.test.js"
51
+ ],
52
+ "collectCoverageFrom": [
53
+ "src/**/*.js",
54
+ "!src/index.js"
55
+ ]
32
56
  }
33
57
  }