mirror of
https://github.com/docker/setup-docker-action.git
synced 2026-01-01 01:51:35 +01:00
migrate eslint config to new format required since 9.0.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
/dist/**
|
||||
/coverage/**
|
||||
/node_modules/**
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"jest": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:jest/recommended",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"jest",
|
||||
"prettier"
|
||||
]
|
||||
}
|
||||
57
eslint.config.js
Normal file
57
eslint.config.js
Normal file
@@ -0,0 +1,57 @@
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const {defineConfig, globalIgnores} = require('eslint/config');
|
||||
const {fixupConfigRules, fixupPluginRules} = require('@eslint/compat');
|
||||
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
|
||||
const jestPlugin = require('eslint-plugin-jest');
|
||||
const prettier = require('eslint-plugin-prettier');
|
||||
const globals = require('globals');
|
||||
const tsParser = require('@typescript-eslint/parser');
|
||||
const js = require('@eslint/js');
|
||||
const {FlatCompat} = require('@eslint/eslintrc');
|
||||
|
||||
// __dirname and __filename exist natively in CommonJS
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all
|
||||
});
|
||||
|
||||
module.exports = defineConfig([
|
||||
globalIgnores(['dist/**/*', 'coverage/**/*', 'node_modules/**/*']),
|
||||
{
|
||||
extends: fixupConfigRules(
|
||||
compat.extends(
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:jest/recommended',
|
||||
'plugin:prettier/recommended'
|
||||
)
|
||||
),
|
||||
|
||||
plugins: {
|
||||
'@typescript-eslint': fixupPluginRules(typescriptEslint),
|
||||
jest: fixupPluginRules(jestPlugin),
|
||||
prettier: fixupPluginRules(prettier)
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.jest
|
||||
},
|
||||
parser: tsParser,
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module'
|
||||
},
|
||||
|
||||
rules: {
|
||||
'@typescript-eslint/no-require-imports': [
|
||||
'error',
|
||||
{
|
||||
allowAsImport: true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]);
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import fs = require('fs');
|
||||
import os = require('os');
|
||||
import path = require('path');
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-docker-action-'));
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
"@docker/actions-toolkit": "^0.69.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.0.0",
|
||||
"@eslint/eslintrc": "^3.3.3",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@types/node": "^20.19.27",
|
||||
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
||||
"@typescript-eslint/parser": "^8.50.0",
|
||||
|
||||
30
yarn.lock
30
yarn.lock
@@ -1285,6 +1285,20 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/compat@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "@eslint/compat@npm:2.0.0"
|
||||
dependencies:
|
||||
"@eslint/core": ^1.0.0
|
||||
peerDependencies:
|
||||
eslint: ^8.40 || 9
|
||||
peerDependenciesMeta:
|
||||
eslint:
|
||||
optional: true
|
||||
checksum: b13e61d2f376744cfa4d2698f50ab12c13f92dbadc853211a8f293b282ab31940c0e7090db33b9be95887b7ebafc8c4f8c497ab39bb830ed5559cf21d079b39e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/config-array@npm:^0.21.1":
|
||||
version: 0.21.1
|
||||
resolution: "@eslint/config-array@npm:0.21.1"
|
||||
@@ -1314,7 +1328,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/eslintrc@npm:^3.3.1":
|
||||
"@eslint/core@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@eslint/core@npm:1.0.0"
|
||||
dependencies:
|
||||
"@types/json-schema": ^7.0.15
|
||||
checksum: 9f32f5c813d4336f94de3ed2f95140d89a842d0b3978254b6f5ddacaa1db5a05cf59d65055040242f91fb5a340638cd3b2bcca875c1b82279a6e63700c80c3cc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/eslintrc@npm:^3.3.1, @eslint/eslintrc@npm:^3.3.3":
|
||||
version: 3.3.3
|
||||
resolution: "@eslint/eslintrc@npm:3.3.3"
|
||||
dependencies:
|
||||
@@ -1331,7 +1354,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/js@npm:9.39.2":
|
||||
"@eslint/js@npm:9.39.2, @eslint/js@npm:^9.39.2":
|
||||
version: 9.39.2
|
||||
resolution: "@eslint/js@npm:9.39.2"
|
||||
checksum: 362aa447266fa5717e762b2b252f177345cb0d7b2954113db9773b3a28898f7cbbc807e07f8078995e6da3f62791f7c5fa2c03517b7170a8e76613cf7fd83c92
|
||||
@@ -3683,6 +3706,9 @@ __metadata:
|
||||
dependencies:
|
||||
"@actions/core": ^1.11.1
|
||||
"@docker/actions-toolkit": ^0.69.0
|
||||
"@eslint/compat": ^2.0.0
|
||||
"@eslint/eslintrc": ^3.3.3
|
||||
"@eslint/js": ^9.39.2
|
||||
"@types/node": ^20.19.27
|
||||
"@typescript-eslint/eslint-plugin": ^8.50.0
|
||||
"@typescript-eslint/parser": ^8.50.0
|
||||
|
||||
Reference in New Issue
Block a user