mirror of
https://github.com/docker/setup-buildx-action.git
synced 2026-01-09 14:03:07 +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
b278ce4ad9
commit
16c25413c8
@ -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"
|
||||
]
|
||||
}
|
||||
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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]);
|
||||
@ -30,6 +30,9 @@
|
||||
"js-yaml": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.0.0",
|
||||
"@eslint/eslintrc": "^3.3.3",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^20.19.27",
|
||||
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
||||
|
||||
30
yarn.lock
30
yarn.lock
@ -1190,6 +1190,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": "npm:^1.0.0"
|
||||
peerDependencies:
|
||||
eslint: ^8.40 || 9
|
||||
peerDependenciesMeta:
|
||||
eslint:
|
||||
optional: true
|
||||
checksum: 10/b1f63053ac643d47ce44d354a65e095e2b59f6b6aee4d6ca08cfa3b0800fc784bbd6895494ba726479faf9591e8e2887dc13c7a776f0d9627f0fdbf7faa34fdb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/config-array@npm:^0.21.1":
|
||||
version: 0.21.1
|
||||
resolution: "@eslint/config-array@npm:0.21.1"
|
||||
@ -1219,7 +1233,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": "npm:^7.0.15"
|
||||
checksum: 10/0e2fc001ec3a12a9d6cd5de8eaf6c9eb1deec892777fed04e59eae0f3073c69988451eda32623524db76adaa7075747a8de5aa39b91b9084c711db452194eae9
|
||||
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:
|
||||
@ -1236,7 +1259,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: 10/6b7f676746f3111b5d1b23715319212ab9297868a0fa9980d483c3da8965d5841673aada2d5653e85a3f7156edee0893a7ae7035211b4efdcb2848154bb947f2
|
||||
@ -3533,6 +3556,9 @@ __metadata:
|
||||
dependencies:
|
||||
"@actions/core": "npm:^1.11.1"
|
||||
"@docker/actions-toolkit": "npm:^0.63.0"
|
||||
"@eslint/compat": "npm:^2.0.0"
|
||||
"@eslint/eslintrc": "npm:^3.3.3"
|
||||
"@eslint/js": "npm:^9.39.2"
|
||||
"@types/js-yaml": "npm:^4.0.9"
|
||||
"@types/node": "npm:^20.19.27"
|
||||
"@typescript-eslint/eslint-plugin": "npm:^8.50.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user