Skip to content

Commit 202e4d1

Browse files
conflicted commits cherry-picked
1 parent 788eeaa commit 202e4d1

10 files changed

Lines changed: 971 additions & 728 deletions

.eslintignore

Whitespace-only changes.

.eslintrc.json

Whitespace-only changes.

dist/index.js

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/licenses.txt

Lines changed: 75 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sourcemap-register.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
const {defineConfig, globalIgnores} = require('eslint/config');
3+
const {fixupConfigRules, fixupPluginRules} = require('@eslint/compat');
4+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
5+
const jestPlugin = require('eslint-plugin-jest');
6+
const prettier = require('eslint-plugin-prettier');
7+
const globals = require('globals');
8+
const tsParser = require('@typescript-eslint/parser');
9+
const js = require('@eslint/js');
10+
const {FlatCompat} = require('@eslint/eslintrc');
11+
12+
// __dirname and __filename exist natively in CommonJS
13+
const compat = new FlatCompat({
14+
baseDirectory: __dirname,
15+
recommendedConfig: js.configs.recommended,
16+
allConfig: js.configs.all
17+
});
18+
19+
module.exports = defineConfig([
20+
globalIgnores(['dist/**/*', 'coverage/**/*', 'node_modules/**/*']),
21+
{
22+
extends: fixupConfigRules(
23+
compat.extends(
24+
'eslint:recommended',
25+
'plugin:@typescript-eslint/eslint-recommended',
26+
'plugin:@typescript-eslint/recommended',
27+
'plugin:jest/recommended',
28+
'plugin:prettier/recommended'
29+
)
30+
),
31+
32+
plugins: {
33+
'@typescript-eslint': fixupPluginRules(typescriptEslint),
34+
jest: fixupPluginRules(jestPlugin),
35+
prettier: fixupPluginRules(prettier)
36+
},
37+
38+
languageOptions: {
39+
globals: {
40+
...globals.node,
41+
...globals.jest
42+
},
43+
parser: tsParser,
44+
ecmaVersion: 'latest',
45+
sourceType: 'module'
46+
},
47+
48+
rules: {
49+
'@typescript-eslint/no-require-imports': [
50+
'error',
51+
{
52+
allowAsImport: true
53+
}
54+
]
55+
}
56+
}
57+
]);

jest.config.ts renamed to jest.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import fs = require('fs');
2-
import os = require('os');
3-
import path = require('path');
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
const fs = require('fs');
3+
const os = require('os');
4+
const path = require('path');
45

56
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-docker-action-'));
67

@@ -9,9 +10,7 @@ process.env = Object.assign({}, process.env, {
910
GITHUB_REPOSITORY: 'docker/setup-docker-action',
1011
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
1112
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
12-
}) as {
13-
[key: string]: string;
14-
};
13+
});
1514

1615
module.exports = {
1716
clearMocks: true,

0 commit comments

Comments
 (0)