import config from 'eslint-config-ksv741'; import nextPlugin from '@next/eslint-plugin-next' const {flatConfig} = nextPlugin; export default [ ...config, flatConfig.coreWebVitals, { name: 'my-rules', files: [ '**/*.js', '**/*.ts', '**/*.tsx', ], rules: { 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], 'import/order': [ 'error', { pathGroups: [ { pattern: '__spec__/**', group: 'builtin', position: 'before', }, { pattern: 'apps/**', group: 'internal', position: 'after', }, { pattern: 'pages/**', group: 'internal', position: 'after', }, { pattern: 'widgets/**', group: 'internal', position: 'after', }, { pattern: 'features/**', group: 'internal', position: 'after', }, { pattern: 'entities/**', group: 'internal', position: 'after', }, { pattern: 'shared/**', group: 'internal', position: 'after', }, ], distinctGroup: true, groups: [ 'builtin', 'external', 'internal', 'parent', 'sibling', 'object', 'index', 'type', ], 'newlines-between': 'always', alphabetize: { order: 'asc', caseInsensitive: true, }, }, ], 'no-await-in-loop': 'off', 'no-void': ['error', { allowAsStatement: true }], // "@typescript-eslint/no-extraneous-class": ['error', {allowEmpty: true}], // "@typescript-eslint/parameter-properties": ['error', { "allow": ["private readonly"] }], '@typescript-eslint/max-params': 'off', '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/no-non-null-assertion': 'off', // todo fixme 'import/max-dependencies': 'off', '@typescript-eslint/no-unsafe-type-assertion': 'off', '@typescript-eslint/no-unsafe-call': 'off', 'import/no-cycle': 'off', '@typescript-eslint/strict-boolean-expressions': 'off', 'import/extensions': 'off', '@typescript-eslint/no-unnecessary-condition': 'off', 'max-classes-per-file': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unnecessary-type-conversion': 'off', '@typescript-eslint/consistent-return': 'off', '@typescript-eslint/class-methods-use-this': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/member-ordering': 'off', 'no-undefined': 'off', '@typescript-eslint/no-misused-spread': 'off', '@typescript-eslint/require-await': 'off', '@typescript-eslint/parameter-properties': 'off', '@typescript-eslint/no-extraneous-class': 'off', '@stylistic/max-len': 'off', '@typescript-eslint/no-unnecessary-type-parameters': 'off', 'import/no-extraneous-dependencies': 'off', 'react/destructuring-assignment': ['off', 'never', { ignoreClassFields: true, destructureInSignature: 'always' }], "@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false } ], '@typescript-eslint/naming-convention': ['error', { selector: 'enum', format: ['UPPER_CASE', 'PascalCase'], }, { selector: 'variable', format: ['camelCase', 'PascalCase', 'UPPER_CASE'], }, { selector: 'function', format: ['camelCase', 'PascalCase'], }, { selector: 'typeLike', format: ['PascalCase'], }], }, }, { ignores: ['src/graphql/generated'] } ];