import filenames from 'eslint-plugin-filenames';
import {
  filenameMatchesExportedDefinition,
  typeEnumMatchesFilename,
  typeAlias,
  interfaceFilename,
  functionMatchesFilename,
} from './naming-convention/index.js';
import { properImportAndUsage } from './react/index.js';
import { requireIndexExport } from './module-structure/index.js';
import { requireStandardFiles } from './component-structure/index.js';
import {
  requireArrowFunction,
  requireArrowFunctionNested,
  requireUseCallbackForFunction,
  requireUseMemoForFunctionReturnsJSX,
  requirePropsInterface,
} from './component/index.js';
import { requireStandardFiles as subComponentRequireStandardFiles } from './sub-component-structure/index.js';
import { ignoreImportPath } from './dependency/index.js';

export default {
  plugins: {
    filenames,
  },
  rules: {
    'react/proper-import-and-usage': properImportAndUsage,
    'module-structure/require-index-export': requireIndexExport,
    'naming-convention/filename-matches-exported-definition': filenameMatchesExportedDefinition,
    'naming-convention/type-enum-matches-filename': typeEnumMatchesFilename,
    'naming-convention/type-alias': typeAlias,
    'naming-convention/interface-filename': interfaceFilename,
    'naming-convention/function-matches-filename': functionMatchesFilename,
    'component-structure/require-standard-files': requireStandardFiles,
    'component/require-props-interface': requirePropsInterface,
    'component/require-arrow-function': requireArrowFunction,
    'component/require-arrow-function-nested': requireArrowFunctionNested,
    'component/require-usecallback-for-function': requireUseCallbackForFunction,
    'component/require-usememo-for-function-returns-jsx': requireUseMemoForFunctionReturnsJSX,
    'sub-component-structure/require-standard-files': subComponentRequireStandardFiles,
    'dependency/ignore-import-path': ignoreImportPath,
  },
};
