mirror of
https://github.com/docker/build-push-action.git
synced 2026-01-10 22:43:06 +08: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:
parent
c6a539d2f5
commit
f91d05adaa
@ -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": 2023,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"jest",
|
|
||||||
"prettier"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
58
eslint.config.js
Normal file
58
eslint.config.js
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/* 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/**/*']),
|
||||||
|
{
|
||||||
|
// prettier-ignore
|
||||||
|
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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
@ -31,6 +31,9 @@
|
|||||||
"handlebars": "^4.7.7"
|
"handlebars": "^4.7.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/compat": "^2.0.0",
|
||||||
|
"@eslint/eslintrc": "^3.3.3",
|
||||||
|
"@eslint/js": "^9.39.2",
|
||||||
"@types/node": "^20.19.27",
|
"@types/node": "^20.19.27",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
||||||
"@typescript-eslint/parser": "^8.50.0",
|
"@typescript-eslint/parser": "^8.50.0",
|
||||||
|
|||||||
30
yarn.lock
30
yarn.lock
@ -1174,6 +1174,20 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"@eslint/config-array@npm:^0.21.1":
|
||||||
version: 0.21.1
|
version: 0.21.1
|
||||||
resolution: "@eslint/config-array@npm:0.21.1"
|
resolution: "@eslint/config-array@npm:0.21.1"
|
||||||
@ -1203,7 +1217,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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
|
version: 3.3.3
|
||||||
resolution: "@eslint/eslintrc@npm:3.3.3"
|
resolution: "@eslint/eslintrc@npm:3.3.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -1220,7 +1243,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/js@npm:9.39.2":
|
"@eslint/js@npm:9.39.2, @eslint/js@npm:^9.39.2":
|
||||||
version: 9.39.2
|
version: 9.39.2
|
||||||
resolution: "@eslint/js@npm:9.39.2"
|
resolution: "@eslint/js@npm:9.39.2"
|
||||||
checksum: 362aa447266fa5717e762b2b252f177345cb0d7b2954113db9773b3a28898f7cbbc807e07f8078995e6da3f62791f7c5fa2c03517b7170a8e76613cf7fd83c92
|
checksum: 362aa447266fa5717e762b2b252f177345cb0d7b2954113db9773b3a28898f7cbbc807e07f8078995e6da3f62791f7c5fa2c03517b7170a8e76613cf7fd83c92
|
||||||
@ -3485,6 +3508,9 @@ __metadata:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@actions/core": ^1.11.1
|
"@actions/core": ^1.11.1
|
||||||
"@docker/actions-toolkit": 0.62.1
|
"@docker/actions-toolkit": 0.62.1
|
||||||
|
"@eslint/compat": ^2.0.0
|
||||||
|
"@eslint/eslintrc": ^3.3.3
|
||||||
|
"@eslint/js": ^9.39.2
|
||||||
"@types/node": ^20.19.27
|
"@types/node": ^20.19.27
|
||||||
"@typescript-eslint/eslint-plugin": ^8.50.0
|
"@typescript-eslint/eslint-plugin": ^8.50.0
|
||||||
"@typescript-eslint/parser": ^8.50.0
|
"@typescript-eslint/parser": ^8.50.0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user