Skip to content

Commit 7726d27

Browse files
authored
ci: transcribe cjs tests to ES Modules and TypeScript (#4091)
* refactor: cjs to mts * chore: revert `Poku` from canary to latest * chore: fix `ssl` wrong param
1 parent d830838 commit 7726d27

File tree

179 files changed

+11247
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+11247
-224
lines changed

.prettierrc

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,27 @@
1313
"htmlWhitespaceSensitivity": "css",
1414
"endOfLine": "lf",
1515
"embeddedLanguageFormatting": "auto",
16-
"singleAttributePerLine": false
16+
"singleAttributePerLine": false,
17+
"overrides": [
18+
{
19+
"files": "*.jsonc",
20+
"options": {
21+
"trailingComma": "none"
22+
}
23+
},
24+
{
25+
"files": "test/esm/**/*.mts",
26+
"options": {
27+
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
28+
"importOrder": [
29+
"<TYPES>^(node:)",
30+
"<TYPES>",
31+
"<TYPES>^[.]",
32+
"<BUILTIN_MODULES>",
33+
"<THIRD_PARTY_MODULES>",
34+
"^[.]"
35+
]
36+
}
37+
}
38+
]
1739
}

eslint.config.mjs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ export default [
9797
},
9898
rules: {
9999
'@typescript-eslint/no-empty-interface': 'off',
100-
'@typescript-eslint/no-explicit-any': 'off',
101100
'@typescript-eslint/no-empty-object-type': 'off',
102101
strict: 'off',
103102
'no-restricted-syntax': [
104103
'error',
105104
{
106105
selector:
107-
'ImportDeclaration[source.value=/^\\./][source.value!=/\\.(m?js)$/]',
108-
message: 'Local imports must have the explicit .mjs or .js extension',
106+
'ImportDeclaration[source.value=/^\\./][source.value!=/\\.(m?js|json)$/]',
107+
message:
108+
'Local imports must have the explicit .mjs, .js, or .json extension',
109109
},
110110
],
111111
},
@@ -144,6 +144,13 @@ export default [
144144
'arrow-parens': ['error', 'always'],
145145
},
146146
},
147+
{
148+
files: ['test/esm/**/*.mts'],
149+
rules: {
150+
'@typescript-eslint/no-unused-vars': 'off',
151+
'@typescript-eslint/no-unsafe-function-type': 'off',
152+
},
153+
},
147154
{
148155
files: ['**/*.mjs', '**/*.mts'],
149156
languageOptions: {

0 commit comments

Comments
 (0)