@runnerty/module-core
Advanced tools
| import globals from 'globals'; | ||
| import path from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import js from '@eslint/js'; | ||
| import { FlatCompat } from '@eslint/eslintrc'; | ||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname, | ||
| recommendedConfig: js.configs.recommended, | ||
| allConfig: js.configs.all | ||
| }); | ||
| export default [ | ||
| { | ||
| ignores: [ | ||
| '**/.vscode', | ||
| '**/api', | ||
| '**/node_modules', | ||
| '**/samples', | ||
| '**/*.md', | ||
| '**/*.json', | ||
| '**/.DS_Store', | ||
| '**/LICENSE' | ||
| ] | ||
| }, | ||
| ...compat.extends('plugin:prettier/recommended'), | ||
| { | ||
| languageOptions: { | ||
| globals: { | ||
| ...globals.node, | ||
| Promise: true, | ||
| global: true | ||
| }, | ||
| ecmaVersion: 2021, | ||
| sourceType: 'module', | ||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true | ||
| } | ||
| } | ||
| }, | ||
| rules: { | ||
| indent: [ | ||
| 'error', | ||
| 2, | ||
| { | ||
| SwitchCase: 1 | ||
| } | ||
| ], | ||
| 'default-case': 'error', | ||
| 'linebreak-style': ['error', 'unix'], | ||
| semi: ['error', 'always'], | ||
| 'no-console': 'error', | ||
| 'no-undef': 'error', | ||
| 'no-var': 'error', | ||
| 'no-caller': 'error', | ||
| 'no-throw-literal': 'error', | ||
| 'no-unneeded-ternary': 'error', | ||
| 'prefer-const': 'error', | ||
| 'comma-spacing': [ | ||
| 'error', | ||
| { | ||
| before: false, | ||
| after: true | ||
| } | ||
| ], | ||
| 'comma-style': ['error', 'last'], | ||
| 'handle-callback-err': ['error', '^(err|error)$'] | ||
| } | ||
| } | ||
| ]; |
+1
-1
| MIT License | ||
| Copyright (c) 2022 Runnerty Tech S.L. | ||
| Copyright (c) 2024 Runnerty Tech S.L. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
+7
-7
| { | ||
| "name": "@runnerty/module-core", | ||
| "version": "3.1.1", | ||
| "version": "3.1.2", | ||
| "description": "Runnerty module core classes", | ||
@@ -10,3 +10,3 @@ "author": "Runnerty Tech", | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "lint": "eslint '**/*.js' && prettier --check '**'" | ||
| "lint": "eslint '**.js' && prettier --check '**'" | ||
| }, | ||
@@ -31,3 +31,3 @@ "repository": { | ||
| "dependencies": { | ||
| "@runnerty/interpreter-core": "~3.1.1", | ||
| "@runnerty/interpreter-core": "~3.1.2", | ||
| "json-stringify-safe": "~5.0.1", | ||
@@ -38,7 +38,7 @@ "lodash": "~4.17.21", | ||
| "devDependencies": { | ||
| "eslint": "^8.13.0", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-prettier": "^4.0.0", | ||
| "prettier": "^2.6.2" | ||
| "eslint": "^9.11.1", | ||
| "eslint-config-prettier": "^9.1.0", | ||
| "eslint-plugin-prettier": "^5.2.1", | ||
| "prettier": "^3.3.3" | ||
| } | ||
| } |
+3
-0
@@ -333,2 +333,3 @@ 'use strict'; | ||
| if (Object.keys(object2KV).length) { | ||
| res[key] = object2KV; | ||
| // Recursive call to obtain key / value of the entire object tree: | ||
@@ -366,2 +367,4 @@ const sub_res = _self.JSON2KV(object2KV, separator); | ||
| const arrLength = arrValues.length; | ||
| // Add the parent array and not only its elements to the response: | ||
| res[key] = arrValues; | ||
| for (let z = 0; z < arrLength; z++) { | ||
@@ -368,0 +371,0 @@ // In case the array has objects: |
Sorry, the diff of this file is not supported yet
| { | ||
| "env": { | ||
| "node": true | ||
| }, | ||
| "extends": ["plugin:prettier/recommended"], | ||
| "globals": { | ||
| "Promise": true, | ||
| "global": true | ||
| }, | ||
| "parserOptions": { | ||
| "ecmaVersion": 2021, | ||
| "sourceType": "module", | ||
| "ecmaFeatures": { | ||
| "jsx": true | ||
| } | ||
| }, | ||
| "rules": { | ||
| "indent": ["error", 2, { "SwitchCase": 1 }], | ||
| "default-case": "error", | ||
| "linebreak-style": ["error", "unix"], | ||
| "semi": ["error", "always"], | ||
| "no-console": "error", | ||
| "no-undef": "error", | ||
| "no-var": "error", | ||
| "no-caller": "error", | ||
| "no-throw-literal": "error", | ||
| "no-unneeded-ternary": "error", | ||
| "prefer-const": "error", | ||
| "comma-spacing": ["error", { "before": false, "after": true }], | ||
| "comma-style": ["error", "last"], | ||
| "handle-callback-err": ["error", "^(err|error)$"] | ||
| } | ||
| } |
35614
2.53%881
4.88%12
-7.69%