Skip to content

Commit 9765768

Browse files
committed
remove linter since we need new lines now
1 parent 8f371fb commit 9765768

File tree

15 files changed

+35
-120
lines changed

15 files changed

+35
-120
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,5 @@ module.exports = {
8888
},
8989
extends: ["plugin:json/recommended-legacy"]
9090
},
91-
{
92-
files: ['templates/**/*.mustache'],
93-
94-
parser: 'eslint-plugin-automation-custom',
95-
plugins: ['automation-custom'],
96-
rules: {
97-
'automation-custom/no-new-line': 'error',
98-
},
99-
},
10091
],
10192
};

clients/algoliasearch-client-csharp/algoliasearch/Serializer/EnumConverter.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ JsonSerializerOptions options
9191
switch (type)
9292
{
9393
case JsonTokenType.String:
94+
{
95+
var stringValue = reader.GetString();
96+
if (stringValue != null && _stringToEnum.TryGetValue(stringValue, out var enumValue))
9497
{
95-
var stringValue = reader.GetString();
96-
if (stringValue != null && _stringToEnum.TryGetValue(stringValue, out var enumValue))
97-
{
98-
return enumValue;
99-
}
100-
101-
break;
102-
}
103-
case JsonTokenType.Number:
104-
{
105-
var numValue = reader.GetInt32();
106-
_numberToEnum.TryGetValue(numValue, out var enumValue);
10798
return enumValue;
10899
}
100+
101+
break;
102+
}
103+
case JsonTokenType.Number:
104+
{
105+
var numValue = reader.GetInt32();
106+
_numberToEnum.TryGetValue(numValue, out var enumValue);
107+
return enumValue;
108+
}
109109
}
110110

111111
return default;

clients/algoliasearch-client-csharp/algoliasearch/Utils/QueryStringHelper.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ public static string ParameterToString(object obj)
3636
case bool boolean:
3737
return boolean ? "true" : "false";
3838
case ICollection collection:
39-
{
40-
var entries = new List<string>();
41-
foreach (var entry in collection)
42-
entries.Add(ParameterToString(entry));
43-
return string.Join(",", entries);
44-
}
39+
{
40+
var entries = new List<string>();
41+
foreach (var entry in collection)
42+
entries.Add(ParameterToString(entry));
43+
return string.Join(",", entries);
44+
}
4545
case Enum when HasEnumMemberAttrValue(obj):
4646
return GetEnumMemberAttrValue(obj);
4747
case AbstractSchema schema when obj.GetType().IsClass:
48-
{
49-
return ParameterToString(schema.ActualInstance);
50-
}
48+
{
49+
return ParameterToString(schema.ActualInstance);
50+
}
5151
default:
5252
return Convert.ToString(obj, CultureInfo.InvariantCulture);
5353
}

clients/algoliasearch-client-php/lib/FormDataProcessor.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* The version of the OpenAPI document: 1.0.0
2020
* Generated by: https://openapi-generator.tech
21-
* Generator version: 7.14.0
21+
* Generator version: 7.16.0
2222
*/
2323

2424
/**
@@ -123,7 +123,11 @@ public static function flatten(array $source, string $start = ''): array
123123
$currentName .= $currentSuffix;
124124
}
125125

126-
$result[$currentName] = ObjectSerializer::toString($val);
126+
if (is_resource($val)) {
127+
$result[$currentName] = $val;
128+
} else {
129+
$result[$currentName] = ObjectSerializer::toString($val);
130+
}
127131
}
128132

129133
$currentName = $start;

eslint/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { endWithDot } from './rules/endWithDot.js';
22
import { hasType } from './rules/hasType.js';
33
import { noBigInt } from './rules/noBigInt.js';
44
import { noFinalDot } from './rules/noFinalDot.js';
5-
import { noNewLine } from './rules/noNewLine.js';
65
import { createOutOfLineRule } from './rules/outOfLineRule.js';
76
import { refCommon } from './rules/refCommon.js';
87
import { singleQuoteRef } from './rules/singleQuoteRef.js';
@@ -14,7 +13,6 @@ const rules = {
1413
'has-type': hasType,
1514
'no-big-int': noBigInt,
1615
'no-final-dot': noFinalDot,
17-
'no-new-line': noNewLine,
1816
'out-of-line-all-of': createOutOfLineRule({ property: 'allOf' }),
1917
'out-of-line-any-of': createOutOfLineRule({ property: 'anyOf' }),
2018
'out-of-line-enum': createOutOfLineRule({ property: 'enum' }),

eslint/src/rules/noNewLine.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

eslint/tests/noNewLine.test.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"cli": "yarn workspace scripts start",
1919
"docker:setup": "./scripts/docker/setup.sh",
2020
"fix:json": "eslint --ext=json . --fix",
21-
"fix:mustache": "eslint --ext=mustache templates/**/tests/ --fix",
2221
"github-actions:lint": "eslint --ext=yml .github/",
2322
"postinstall": "husky && yarn workspace eslint-plugin-automation-custom build",
2423
"playground:browser": "yarn workspace javascript-browser-playground start",

templates/javascript/clients/client/api/ingestionHelpers.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ async chunkedPush(
7373
}
7474

7575
return responses;
76-
},
76+
},

templates/javascript/clients/client/api/nodeHelpers.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ async accountCopyIndex(
133133
for (const response of responses) {
134134
await destinationClient.waitForTask({ indexName: destinationIndexName, taskID: response.taskID });
135135
}
136-
},
136+
},

0 commit comments

Comments
 (0)