mirror of
https://github.com/docker/metadata-action.git
synced 2026-04-19 11:51:10 +03:00
cf6a6ce0f7
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
53 lines
1.2 KiB
JavaScript
53 lines
1.2 KiB
JavaScript
import {defineConfig} from 'eslint/config';
|
|
import js from '@eslint/js';
|
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
import vitest from '@vitest/eslint-plugin';
|
|
import globals from 'globals';
|
|
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
|
import eslintPluginPrettier from 'eslint-plugin-prettier';
|
|
|
|
export default defineConfig([
|
|
{
|
|
ignores: ['.yarn/**/*', 'coverage/**/*', 'dist/**/*']
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs['flat/recommended'],
|
|
eslintConfigPrettier,
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['__tests__/**'],
|
|
...vitest.configs.recommended,
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
...vitest.environments.env.globals
|
|
}
|
|
},
|
|
rules: {
|
|
...vitest.configs.recommended.rules,
|
|
'vitest/no-conditional-expect': 'error',
|
|
'vitest/no-disabled-tests': 0
|
|
}
|
|
},
|
|
{
|
|
plugins: {
|
|
prettier: eslintPluginPrettier
|
|
},
|
|
rules: {
|
|
'prettier/prettier': 'error',
|
|
'@typescript-eslint/no-require-imports': [
|
|
'error',
|
|
{
|
|
allowAsImport: true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]);
|