Disable linting for autogenerated SDK TS definitions (#10747)

This commit is contained in:
Álvaro Mondéjar Rubio 2024-03-31 14:18:52 +02:00 committed by GitHub
parent 6d26eddf75
commit f2cdbc3db5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View file

@ -2,7 +2,6 @@
"prettier": true,
"space": 2,
"plugins": ["import"],
"ignores": ["sdk.d.ts"],
"rules": {
"n/no-unsupported-features": "off",
"n/no-unsupported-features/node-builtins": "off",
@ -35,7 +34,11 @@
"overrides": [
{
"files": ["sdk.mjs", "sdk.d.ts"],
"nodeVersion": ">=14"
"nodeVersion": ">=14",
"rules": {
"eslint-comments/disable-enable-pair": "off",
"unicorn/no-abusive-eslint-disable": "off"
}
},
{
"files": [

View file

@ -55,7 +55,7 @@ const generateSdkTs = async () => {
await generateSdkMts();
const autogeneratedMessage =
'/* The next code is autogenerated from sdk.mjs */';
'/* The next code is autogenerated from sdk.mjs */\n/* eslint-disable */';
const newSdkTsContent =
// eslint-disable-next-line unicorn/no-await-expression-member
(await fs.readFile(sdkTs, 'utf8')).split(autogeneratedMessage)[0] +

1
sdk.d.ts vendored
View file

@ -61,6 +61,7 @@ export type IconData = {
};
/* The next code is autogenerated from sdk.mjs */
/* eslint-disable */
export const URL_REGEX: RegExp;
export const SVG_PATH_REGEX: RegExp;