mirror of
https://github.com/dagu-org/dagu.git
synced 2025-12-28 06:34:22 +00:00
39 lines
1.0 KiB
JavaScript
39 lines
1.0 KiB
JavaScript
import { FlatCompat } from '@eslint/eslintrc';
|
|
import js from '@eslint/js';
|
|
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
recommendedConfig: js.configs.recommended,
|
|
allConfig: js.configs.all,
|
|
});
|
|
|
|
export default defineConfig([
|
|
globalIgnores(['**/node_modules/', '**/*.js']),
|
|
{
|
|
extends: compat.extends(
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended'
|
|
),
|
|
|
|
plugins: {
|
|
'@typescript-eslint': typescriptEslint,
|
|
},
|
|
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
},
|
|
|
|
rules: {
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
},
|
|
ignores: ['node_modules', 'dist', 'build', 'coverage', '**/*.js'],
|
|
},
|
|
]);
|