module.exports = { root: true, plugins: ['@typescript-eslint/eslint-plugin', 'import'], extends: [ 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', ], env: { node: true, jest: true, }, overrides: [ { files: ['**/*.ts'], parser: '@typescript-eslint/parser', parserOptions: { project: 'tsconfig.json', tsconfigRootDir: __dirname, }, plugins: ['@typescript-eslint/eslint-plugin', 'import'], extends: [ 'plugin:@typescript-eslint/recommended', // Select rules from 'plugin:@typescript-eslint/recommended-requiring-type-checking', // are enabled below. For max pain, enable the whole lot. // 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:prettier/recommended', ], rules: { '@typescript-eslint/explicit-module-boundary-types': [ 'error', { allowArgumentsExplicitlyTypedAsAny: true, }, ], '@typescript-eslint/no-unnecessary-condition': 'error', '@typescript-eslint/restrict-plus-operands': 'error', '@typescript-eslint/restrict-template-expressions': 'error', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-unsafe-assignment': 'error', '@typescript-eslint/no-unused-vars': [ 'error', { argsIgnorePattern: '^_' }, ], }, }, ], rules: { 'import/first': 'error', 'import/no-duplicates': 'error', 'import/order': [ 'error', { groups: [ 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', ], pathGroups: [ { pattern: '~/**', group: 'internal', position: 'after', }, ], alphabetize: { order: 'asc', caseInsensitive: true, }, 'newlines-between': 'always', }, ], 'no-console': 'error', }, };