// eslint-disable-next-line n/no-unpublished-require const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ root: true, env: { es2022: true, node: true }, parserOptions: { sourceType: 'module', ecmaVersion: 2022 }, plugins: ['simple-import-sort', 'import'], extends: ['eslint:recommended', 'plugin:import/recommended'], settings: { 'import/resolver': { typescript: { project: './tsconfig.json' } } }, rules: { 'simple-import-sort/imports': 'error', 'simple-import-sort/exports': 'error' // 'sort-imports': [ // 'error', // { // ignoreCase: false, // ignoreDeclarationSort: true, // ignoreMemberSort: false, // memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], // allowSeparatedGroups: true // } // ], // 'import/order': [ // 'error', // { // groups: [ // 'builtin', // Built-in imports (come from NodeJS native) go first // 'external', // <- External imports // 'internal', // <- Absolute imports // ['sibling', 'parent'], // <- Relative imports, the sibling and parent types they can be mingled together // 'index', // <- Index imports // 'unknown' // <- Unknown // ], // 'newlines-between': 'always', // alphabetize: { // /* Sort in ascending order. Options: ["ignore", "asc", "desc"] */ // order: 'asc', // /* Ignore case. Options: [true, false] */ // caseInsensitive: true // } // } // ] }, overrides: [ { files: ['**/*.ts'], parser: '@typescript-eslint/parser', parserOptions: { project: './tsconfig.json' }, plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'], extends: [ 'plugin:@typescript-eslint/strict-type-checked', 'plugin:@typescript-eslint/stylistic-type-checked', 'plugin:import/typescript', 'standard-with-typescript' ], rules: { 'operator-linebreak': 'off', 'tsdoc/syntax': 'warn' } }, { files: ['**/*.js', '**/*.cjs', '**/*.mjs'], plugins: ['jsdoc'], extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'], rules: { 'n/shebang': 'off' } } ] })