Skip to content

Commit 8228c15

Browse files
chore(deps): update dependency @apify/eslint-config to v1 (#765)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vlad Frangu <[email protected]>
1 parent 55f48a3 commit 8228c15

Some content is hidden

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

66 files changed

+640
-1017
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ end_of_line = lf
1010
# editorconfig-tools is unable to ignore longs strings or urls
1111
max_line_length = null
1212

13+
[*.ts]
14+
indent_style = tab
15+
indent_size = 4
16+
17+
[*.js]
18+
indent_style = tab
19+
indent_size = 4
20+
1321
[*.md]
1422
indent_size = 2
1523

.eslintrc.json

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

.vscode/settings.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"[javascript]": {
3+
"editor.defaultFormatter": "biomejs.biome"
4+
},
5+
"[javascriptreact]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "biomejs.biome"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "biomejs.biome"
13+
},
14+
"[typescriptreact]": {
15+
"editor.defaultFormatter": "biomejs.biome"
16+
},
17+
"[jsonc]": {
18+
"editor.defaultFormatter": "biomejs.biome"
19+
},
20+
"[yaml]": {
21+
"editor.defaultFormatter": "biomejs.biome"
22+
},
23+
"[markdown]": {
24+
"editor.defaultFormatter": "esbenp.prettier-vscode",
25+
"files.trimTrailingWhitespace": false
26+
}
27+
}

eslint.config.mjs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import prettier from 'eslint-config-prettier';
2+
import tsEslint from 'typescript-eslint';
3+
4+
// eslint-disable-next-line import/extensions -- todo: the import/extensions rule should be replaced with something that can handle exports in a package.json
5+
import apify from '@apify/eslint-config/ts';
6+
7+
export default [
8+
{
9+
ignores: [
10+
'**/dist',
11+
'node_modules',
12+
'coverage',
13+
'website/{build,.docusaurus}',
14+
'**/*.d.ts',
15+
'test/tmp/**/*',
16+
'.yarn/**/*',
17+
],
18+
},
19+
...apify,
20+
prettier,
21+
{
22+
languageOptions: {
23+
parser: tsEslint.parser,
24+
parserOptions: {
25+
project: 'tsconfig.eslint.json',
26+
},
27+
},
28+
},
29+
{
30+
plugins: {
31+
'@typescript-eslint': tsEslint.plugin,
32+
},
33+
rules: {
34+
'no-use-before-define': 'off',
35+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
36+
37+
'no-console': 'off',
38+
39+
'no-param-reassign': 'off',
40+
// We have env variables with _ in their name
41+
'no-underscore-dangle': 'off',
42+
43+
// we do default exports
44+
// TODO: remove once moved to yargs
45+
'import/no-default-export': 'off',
46+
47+
'@typescript-eslint/consistent-type-imports': [
48+
'error',
49+
{
50+
disallowTypeAnnotations: false,
51+
},
52+
],
53+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
54+
55+
// Not ideal, but we still use any for simplicity
56+
'@typescript-eslint/no-explicit-any': 'off',
57+
58+
// '@typescript-eslint/array-type': 'error',
59+
// '@typescript-eslint/no-empty-object-type': 'off',
60+
},
61+
},
62+
{
63+
files: ['website/**/*'],
64+
rules: {
65+
'@typescript-eslint/no-shadow': 'off',
66+
'no-console': 'off',
67+
'no-undef': 'off',
68+
},
69+
},
70+
{
71+
files: ['src/**/*'],
72+
rules: {
73+
'no-console': 'off',
74+
'consistent-return': 'off',
75+
},
76+
},
77+
];

package.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"test": "vitest run",
1111
"test-python": "vitest run -t '.*\\[python\\]'",
1212
"test:cucumber": "cross-env NODE_OPTIONS=\"--import tsx\" cucumber-js",
13-
"lint": "eslint src test .yarn/plugins --ext .ts,.cjs,.mjs",
14-
"lint:fix": "eslint src test .yarn/plugins --fix --ext .ts,.cjs,.mjs",
13+
"lint": "eslint src test --ext .ts,.cjs,.mjs",
14+
"lint:fix": "eslint src test --fix --ext .ts,.cjs,.mjs",
1515
"format": "biome format . && prettier --check \"**/*.{md,yml,yaml}\"",
1616
"format:fix": "biome format --write . && prettier --write \"**/*.{md,yml,yaml}\"",
1717
"clean": "rimraf dist",
@@ -102,10 +102,9 @@
102102
"which": "^5.0.0"
103103
},
104104
"devDependencies": {
105-
"@apify/eslint-config": "^0.4.0",
106-
"@apify/eslint-config-ts": "^0.4.1",
107-
"@apify/tsconfig": "^0.1.0",
108-
"@biomejs/biome": "^1.8.3",
105+
"@apify/eslint-config": "^1.0.0",
106+
"@apify/tsconfig": "^0.1.1",
107+
"@biomejs/biome": "^1.9.4",
109108
"@crawlee/types": "^3.11.1",
110109
"@cucumber/cucumber": "^11.0.0",
111110
"@oclif/test": "^4.0.8",
@@ -124,21 +123,20 @@
124123
"@types/node": "^22.0.0",
125124
"@types/semver": "^7.5.8",
126125
"@types/which": "^3.0.4",
127-
"@typescript-eslint/eslint-plugin": "^7.0.2",
128-
"@typescript-eslint/parser": "^7.0.2",
129126
"@yarnpkg/core": "^4.1.2",
130127
"apify": "^3.2.4",
131128
"chai": "^4.4.1",
132129
"cross-env": "^7.0.3",
133-
"eslint": "^8.57.0",
134-
"eslint-config-prettier": "^10.0.0",
135-
"lint-staged": "^15.2.8",
130+
"eslint": "^9.25.1",
131+
"eslint-config-prettier": "^10.1.2",
132+
"lint-staged": "^15.5.1",
136133
"mdast-util-from-markdown": "^2.0.2",
137134
"mock-stdin": "^1.0.0",
138135
"oclif": "^4.14.15",
139-
"prettier": "^3.3.3",
136+
"prettier": "^3.5.3",
140137
"tsx": "^4.16.5",
141-
"typescript": "^5.5.4",
138+
"typescript": "^5.8.3",
139+
"typescript-eslint": "^8.31.0",
142140
"vitest": "^3.0.0"
143141
},
144142
"oclif": {

renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
"groupSlug": "all-non-major",
2222
"automerge": true,
2323
"automergeType": "branch"
24+
},
25+
{
26+
"groupName": "eslint/prettier/biome",
27+
"automerge": true,
28+
"groupSlug": "formatting-linting-dependencies",
29+
"matchPackageNames": ["/eslint/", "/prettier/", "/biome/"]
2430
}
2531
],
2632
"schedule": ["every weekday"]

src/commands/actor/charge.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { APIFY_ENV_VARS } from '@apify/consts';
21
import { Args, Flags } from '@oclif/core';
32

3+
import { APIFY_ENV_VARS } from '@apify/consts';
4+
45
import { getApifyTokenFromEnvOrAuthFile } from '../../lib/actor.js';
56
import { ApifyCommand } from '../../lib/apify_command.js';
67
import { info } from '../../lib/outputs.js';

src/commands/actor/get-public-url.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { Args } from '@oclif/core';
2+
13
import { ACTOR_ENV_VARS, APIFY_ENV_VARS } from '@apify/consts';
24
import { createHmacSignature } from '@apify/utilities';
3-
import { Args } from '@oclif/core';
45

56
import { getApifyStorageClient } from '../../lib/actor.js';
67
import { ApifyCommand } from '../../lib/apify_command.js';

src/commands/actors/call.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import chalk from 'chalk';
1313

1414
import { ApifyCommand } from '../../lib/apify_command.js';
1515
import { getInputOverride } from '../../lib/commands/resolve-input.js';
16-
import { SharedRunOnCloudFlags, runActorOrTaskOnCloud } from '../../lib/commands/run-on-cloud.js';
16+
import { runActorOrTaskOnCloud, SharedRunOnCloudFlags } from '../../lib/commands/run-on-cloud.js';
1717
import { CommandExitCodes, LOCAL_CONFIG_PATH } from '../../lib/consts.js';
1818
import { error, simpleLog } from '../../lib/outputs.js';
1919
import { getLocalConfig, getLocalUserInfo, getLoggedClientOrThrow, TimestampFormatter } from '../../lib/utils.js';
@@ -222,7 +222,9 @@ export class ActorsCallCommand extends ApifyCommand<typeof ActorsCallCommand> {
222222
break;
223223
}
224224

225-
await new Promise((resolve) => setTimeout(resolve, 250));
225+
await new Promise((resolve) => {
226+
setTimeout(resolve, 250);
227+
});
226228
} while (retries--);
227229

228230
const dataset = await apifyClient.dataset(datasetId).downloadItems(DownloadItemsFormat.JSON, {

src/commands/actors/ls.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import type { ACTOR_JOB_STATUSES } from '@apify/consts';
21
import { Flags } from '@oclif/core';
32
import { Time } from '@sapphire/duration';
43
import type { Actor, ActorRunListItem, ActorTaggedBuild, PaginatedList } from 'apify-client';
54
import chalk from 'chalk';
65

6+
import type { ACTOR_JOB_STATUSES } from '@apify/consts';
7+
78
import { ApifyCommand } from '../../lib/apify_command.js';
89
import { prettyPrintStatus } from '../../lib/commands/pretty-print-status.js';
910
import { CompactMode, kSkipColumn, ResponsiveTable } from '../../lib/commands/responsive-table.js';

0 commit comments

Comments
 (0)