UNPKG

dc-management-sdk-js

Version:
54 lines (47 loc) 1.57 kB
import { defineConfig } from 'eslint/config'; import typescriptEslintEslintPlugin from '@typescript-eslint/eslint-plugin'; import unusedImports from 'eslint-plugin-unused-imports'; import globals from 'globals'; import tsParser from '@typescript-eslint/parser'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; import js from '@eslint/js'; import { FlatCompat } from '@eslint/eslintrc'; 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([ { extends: compat.extends( 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'prettier/@typescript-eslint' ), plugins: { '@typescript-eslint': typescriptEslintEslintPlugin, 'unused-imports': unusedImports, }, languageOptions: { globals: { ...globals.node, ...globals.jest, }, parser: tsParser, }, rules: { '@typescript-eslint/no-parameter-properties': 'off', '@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-unused-vars': 'off', 'unused-imports/no-unused-imports': 2, 'unused-imports/no-unused-vars': 1, }, }, ]);