Skip to content

Commit 61d6c85

Browse files
committed
chore: make lint-staged target only source and scripts (no advanced ignore)
1 parent 1e1c52e commit 61d6c85

File tree

6 files changed

+36
-16
lines changed

6 files changed

+36
-16
lines changed

biome.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,28 @@
112112
}
113113
},
114114
"overrides": [
115+
{
116+
"includes": ["**/dist/**"],
117+
"linter": {
118+
"enabled": false
119+
}
120+
},
121+
{
122+
"includes": ["coverage/**"],
123+
"linter": {
124+
"enabled": false
125+
}
126+
},
127+
{
128+
"includes": ["scripts/**/*.ts"],
129+
"linter": {
130+
"rules": {
131+
"style": {
132+
"useNamingConvention": "off"
133+
}
134+
}
135+
}
136+
},
115137
{
116138
"includes": [
117139
"packages/client/src/internal/interceptors/types.ts"

examples/nodejs-minimal/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
44
import { Registry } from '@scaleway/sdk'
55
import { createClient } from '@scaleway/sdk-client'
6-
import * as http from 'http'
6+
import * as http from 'node:http'
77

88
const hostname = '127.0.0.1'
99
const port = 3000

examples/serverless-function-minimal/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ const buildErrorRes = (error?: unknown) => ({
1818
statusCode: error instanceof Errors.ScalewayError ? error.status : 500,
1919
})
2020

21-
export const list = async (event: any, context: any, callback: any) => {
21+
export const list = async (
22+
_event: unknown,
23+
_context: unknown,
24+
_callback: unknown,
25+
) => {
2226
try {
2327
return buildJsonRes(await api.listNamespaces().all())
2428
} catch (error) {

package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"format": "biome check --linter-enabled=false --write .",
2727
"format:check": "biome check --linter-enabled=false .",
2828
"prettier": "prettier --write '**/*.{md,mdx,yml,yaml}'",
29-
"lint": "biome lint packages/*/src scripts/**/*.ts",
29+
"lint": "biome lint .",
3030
"lint:fix": "biome check --write .",
3131
"prepare": "husky",
3232
"test": "vitest run",
@@ -35,17 +35,10 @@
3535
"test:ui": "vitest --ui"
3636
},
3737
"lint-staged": {
38-
"globOptions": {
39-
"ignore": [
40-
"**/*.gen.ts",
41-
"packages_generated/**",
42-
"**/dist/**",
43-
"**/build/**",
44-
"**/coverage/**",
45-
"**/examples/**"
46-
]
47-
},
48-
"*.{ts,tsx,js,jsx}": [
38+
"packages/*/src/**/*.{ts,tsx,js,jsx}": [
39+
"biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"
40+
],
41+
"scripts/**/*.ts": [
4942
"biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"
5043
],
5144
"*.json": [

packages/client/src/helpers/__tests__/json.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('isJSON', () => {
99
},
1010
)
1111

12-
test.each([undefined, () => {}, Symbol(42)])(
12+
test.each([undefined, () => { /* noop */ }, Symbol(42)])(
1313
`rejects %s as a valid JSON value`,
1414
obj => {
1515
expect(isJSON(obj)).toBeFalsy()
@@ -32,7 +32,7 @@ describe('isJSONObject', () => {
3232
null,
3333
[true, 'two', 3],
3434
undefined,
35-
() => {},
35+
() => { /* noop */ },
3636
Symbol(42),
3737
])(`rejects %s as a valid JSONObject value`, obj => {
3838
expect(isJSONObject(obj)).toBeFalsy()

packages/client/src/helpers/marshalling.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type URLParameterValue = string | number | boolean | Date | null
6767
*
6868
* @internal
6969
*/
70+
/* biome-ignore lint/complexity/noExcessiveCognitiveComplexity: flattening would be intrusive; keep current structure */
7071
export const urlParams = (
7172
...paramTuples: Readonly<
7273
[string, URLParameterValue | URLParameterValue[] | undefined]

0 commit comments

Comments
 (0)