@keragon/connector-cli 0.0.12 → 0.0.14
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/assets/templates/create/connector/eslint.config.mjs.ejs +129 -0
- package/assets/templates/create/connector/jest.config.ts.ejs +6 -0
- package/assets/templates/create/connector/package.json.ejs +14 -7
- package/assets/templates/create/connector/tsconfig.json.ejs +1 -1
- package/assets/templates/create/connector/tsconfig.lib.json.ejs +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/assets/templates/create/connector/.eslintrc.json.ejs +0 -58
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import typescript from '@typescript-eslint/eslint-plugin';
|
|
3
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
4
|
+
import jsoncParser from 'jsonc-eslint-parser';
|
|
5
|
+
import jsonc from 'eslint-plugin-jsonc';
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
// Base configuration for all files
|
|
9
|
+
js.configs.recommended,
|
|
10
|
+
|
|
11
|
+
// Global ignore patterns
|
|
12
|
+
{
|
|
13
|
+
ignores: [
|
|
14
|
+
'dist/',
|
|
15
|
+
'node_modules/',
|
|
16
|
+
'*.d.ts',
|
|
17
|
+
'coverage/'
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
// TypeScript and JavaScript configuration
|
|
22
|
+
{
|
|
23
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
24
|
+
languageOptions: {
|
|
25
|
+
parser: typescriptParser,
|
|
26
|
+
parserOptions: {
|
|
27
|
+
ecmaVersion: 'latest',
|
|
28
|
+
sourceType: 'module'
|
|
29
|
+
},
|
|
30
|
+
globals: {
|
|
31
|
+
// Node.js globals
|
|
32
|
+
process: 'readonly',
|
|
33
|
+
__dirname: 'readonly',
|
|
34
|
+
__filename: 'readonly',
|
|
35
|
+
global: 'readonly',
|
|
36
|
+
Buffer: 'readonly',
|
|
37
|
+
console: 'readonly',
|
|
38
|
+
setTimeout: 'readonly',
|
|
39
|
+
clearTimeout: 'readonly',
|
|
40
|
+
setInterval: 'readonly',
|
|
41
|
+
clearInterval: 'readonly',
|
|
42
|
+
setImmediate: 'readonly',
|
|
43
|
+
clearImmediate: 'readonly',
|
|
44
|
+
// Web API globals
|
|
45
|
+
URL: 'readonly'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
plugins: {
|
|
49
|
+
'@typescript-eslint': typescript
|
|
50
|
+
},
|
|
51
|
+
rules: {
|
|
52
|
+
'no-unused-vars': 'off',
|
|
53
|
+
'@typescript-eslint/no-unused-vars': [
|
|
54
|
+
'error',
|
|
55
|
+
{
|
|
56
|
+
args: 'all',
|
|
57
|
+
argsIgnorePattern: '^_',
|
|
58
|
+
varsIgnorePattern: '^_',
|
|
59
|
+
caughtErrorsIgnorePattern: '^_',
|
|
60
|
+
destructuredArrayIgnorePattern: '^_',
|
|
61
|
+
ignoreRestSiblings: false
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
'no-console': 'error',
|
|
65
|
+
'no-debugger': 'error',
|
|
66
|
+
'prefer-const': 'error',
|
|
67
|
+
'no-var': 'error',
|
|
68
|
+
'no-extra-semi': 'error',
|
|
69
|
+
quotes: ['warn', 'single', { avoidEscape: true }],
|
|
70
|
+
'indent': ['error', 2, { 'SwitchCase': 1 }]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// Test files configuration
|
|
75
|
+
{
|
|
76
|
+
files: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.test.ts', '**/*.test.tsx', '**/*.spec.js', '**/*.spec.jsx', '**/*.test.js', '**/*.test.jsx'],
|
|
77
|
+
languageOptions: {
|
|
78
|
+
globals: {
|
|
79
|
+
// Jest globals
|
|
80
|
+
jest: 'readonly',
|
|
81
|
+
describe: 'readonly',
|
|
82
|
+
it: 'readonly',
|
|
83
|
+
test: 'readonly',
|
|
84
|
+
expect: 'readonly',
|
|
85
|
+
beforeEach: 'readonly',
|
|
86
|
+
afterEach: 'readonly',
|
|
87
|
+
beforeAll: 'readonly',
|
|
88
|
+
afterAll: 'readonly',
|
|
89
|
+
xdescribe: 'readonly',
|
|
90
|
+
xit: 'readonly',
|
|
91
|
+
xtest: 'readonly',
|
|
92
|
+
fit: 'readonly',
|
|
93
|
+
fdescribe: 'readonly'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
rules: {
|
|
97
|
+
'no-console': 'warn'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
// Jest config files
|
|
102
|
+
{
|
|
103
|
+
files: ['**/jest.config.ts'],
|
|
104
|
+
languageOptions: {
|
|
105
|
+
globals: {
|
|
106
|
+
module: 'readonly'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// JSON files configuration using jsonc-eslint-parser
|
|
112
|
+
{
|
|
113
|
+
files: ['**/*.json'],
|
|
114
|
+
languageOptions: {
|
|
115
|
+
parser: jsoncParser
|
|
116
|
+
},
|
|
117
|
+
plugins: {
|
|
118
|
+
jsonc: jsonc
|
|
119
|
+
},
|
|
120
|
+
rules: {
|
|
121
|
+
'jsonc/no-dupe-keys': 'error',
|
|
122
|
+
'jsonc/no-comments': 'error',
|
|
123
|
+
'jsonc/comma-dangle': ['error', 'never'],
|
|
124
|
+
'jsonc/indent': ['error', 2],
|
|
125
|
+
'jsonc/quotes': ['error', 'double'],
|
|
126
|
+
'jsonc/quote-props': ['error', 'always']
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
];
|
|
@@ -9,16 +9,23 @@
|
|
|
9
9
|
},
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "jest --passWithNoTests"
|
|
14
|
+
},
|
|
12
15
|
"dependencies": {
|
|
13
|
-
"@keragon/connector-sdk": "^0.0.
|
|
16
|
+
"@keragon/connector-sdk": "^0.0.4"
|
|
14
17
|
},
|
|
15
18
|
"devDependencies": {
|
|
16
|
-
"jest": "^
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"jest": "^30.0.5",
|
|
20
|
+
"ts-jest": "^29.4.1",
|
|
21
|
+
"ts-node": "^10.9.2",
|
|
22
|
+
"@types/jest": "^30.0.0",
|
|
23
|
+
"@eslint/js": "^9.32.0",
|
|
24
|
+
"@typescript-eslint/parser": "^8.39.0",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
26
|
+
"eslint": "^9.32.0",
|
|
27
|
+
"typescript": "^5.9.2",
|
|
28
|
+
"jsonc-eslint-parser": "^2.4.0",
|
|
22
29
|
"eslint-plugin-jsonc": "^2.20.1"
|
|
23
30
|
}
|
|
24
31
|
}
|