scats 1.3.2 → 1.4.0-dev
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/.eslintrc.cjs +44 -0
- package/jest.config.js +32 -0
- package/package.json +8 -7
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser',
|
|
3
|
+
parserOptions: {
|
|
4
|
+
project: './tsconfig-eslint.json',
|
|
5
|
+
sourceType: 'module',
|
|
6
|
+
},
|
|
7
|
+
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
8
|
+
extends: [
|
|
9
|
+
"eslint:recommended",
|
|
10
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
11
|
+
'plugin:@typescript-eslint/recommended'
|
|
12
|
+
],
|
|
13
|
+
root: true,
|
|
14
|
+
env: {
|
|
15
|
+
node: true,
|
|
16
|
+
jest: true,
|
|
17
|
+
},
|
|
18
|
+
rules: {
|
|
19
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
20
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
21
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
22
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
23
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
24
|
+
'@typescript-eslint/member-delimiter-style': 'error',
|
|
25
|
+
'quotes': ["error", "single"],
|
|
26
|
+
"camelcase": ["error", {"properties": "always"}],
|
|
27
|
+
"semi": "off",
|
|
28
|
+
"@typescript-eslint/semi": ["error"],
|
|
29
|
+
"@typescript-eslint/prefer-readonly": ["error"],
|
|
30
|
+
"no-labels": "error",
|
|
31
|
+
"key-spacing": "error",
|
|
32
|
+
"keyword-spacing": "error",
|
|
33
|
+
"no-continue": "error",
|
|
34
|
+
"no-lonely-if": "error",
|
|
35
|
+
"no-multi-assign": "error",
|
|
36
|
+
"no-nested-ternary": "error",
|
|
37
|
+
"no-new-object": "error",
|
|
38
|
+
"no-unneeded-ternary": "error",
|
|
39
|
+
"no-whitespace-before-property": "error",
|
|
40
|
+
"nonblock-statement-body-position": "error",
|
|
41
|
+
'arrow-spacing': "error",
|
|
42
|
+
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "_"}]
|
|
43
|
+
},
|
|
44
|
+
};
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
const config = {
|
|
3
|
+
preset: 'ts-jest',
|
|
4
|
+
testEnvironment: 'node',
|
|
5
|
+
rootDir: '.',
|
|
6
|
+
roots: ['test'],
|
|
7
|
+
collectCoverageFrom: ["src/**/*.ts"],
|
|
8
|
+
reporters: ['default'],
|
|
9
|
+
coverageThreshold: {
|
|
10
|
+
global: {
|
|
11
|
+
branches: 10,
|
|
12
|
+
functions: 50,
|
|
13
|
+
lines: 50,
|
|
14
|
+
statements: 50
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
extensionsToTreatAsEsm: ['.ts'],
|
|
18
|
+
moduleNameMapper: {
|
|
19
|
+
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
20
|
+
},
|
|
21
|
+
transform: {
|
|
22
|
+
// '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
|
|
23
|
+
// '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
|
|
24
|
+
'^.+\\.tsx?$': [
|
|
25
|
+
'ts-jest',
|
|
26
|
+
{
|
|
27
|
+
useESM: true,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scats",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-dev",
|
|
4
4
|
"description": "Useful scala classes in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"clean": "rimraf dist",
|
|
9
10
|
"lint": "eslint \"{src,test}/**/*.ts\" --fix",
|
|
@@ -36,15 +37,15 @@
|
|
|
36
37
|
},
|
|
37
38
|
"homepage": "https://github.com/papirosko/scats#readme",
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@types/jest": "
|
|
40
|
+
"@types/jest": "27.0.3",
|
|
40
41
|
"@typescript-eslint/eslint-plugin": "5.6.0",
|
|
41
42
|
"@typescript-eslint/parser": "5.6.0",
|
|
42
43
|
"eslint": "7.32.0",
|
|
43
|
-
"eslint-plugin-import": "
|
|
44
|
-
"jest": "
|
|
45
|
-
"ts-jest": "
|
|
46
|
-
"ts-node": "
|
|
47
|
-
"typescript": "
|
|
44
|
+
"eslint-plugin-import": "2.25.3",
|
|
45
|
+
"jest": "27.4.4",
|
|
46
|
+
"ts-jest": "27.1.1",
|
|
47
|
+
"ts-node": "10.4.0",
|
|
48
|
+
"typescript": "4.5.5"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
51
|
"tslib": "^2.3.1"
|