My ESLint and Prettier configurations

Command

npm install -D typescript prettier eslint-plugin-prettier eslint-config-prettier eslint eslint-plugin-promise eslint-config-standard eslint-plugin-sonarjs eslint-plugin-unicorn eslint-plugin-import eslint-plugin-regexp eslint-plugin-simple-import-sort eslint-plugin-unused-imports eslint-plugin-sort-destructure-keys @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-typescript-sort-keys eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-next

.eslintrc.cjs

/** @type {import('eslint').Linter.Config} */
module.exports = {
  env: {
    browser: true,
    node: true,
  },
  extends: [
    'eslint:recommended',
    'plugin:promise/recommended',
    'standard',
    'plugin:sonarjs/recommended',
    'plugin:unicorn/recommended',
    'plugin:import/recommended',
    'plugin:regexp/recommended',
    'plugin:@next/next/recommended',
    'plugin:prettier/recommended',
  ],
  plugins: ['simple-import-sort', 'unused-imports', 'sort-destructure-keys'],
  parserOptions: {
    ecmaVersion: 2022,
  },
  rules: {
    'simple-import-sort/imports': 'error',
    'simple-import-sort/exports': 'error',
    'sort-destructure-keys/sort-destructure-keys': ['error', { caseSensitive: true }],
    'unused-imports/no-unused-imports': 'error',
    'unused-imports/no-unused-vars': [
      'warn',
      {
        vars: 'all',
        varsIgnorePattern: '^_',
        args: 'after-used',
        argsIgnorePattern: '^_',
      },
    ],
    'import/no-unresolved': 'off',
    'unicorn/prevent-abbreviations': 'off',
    'unicorn/consistent-function-scoping': 'off',
  },
  overrides: [
    {
      files: ['*.ts', '*.tsx'],
      extends: ['plugin:@typescript-eslint/recommended', 'plugin:typescript-sort-keys/recommended'],
      parser: '@typescript-eslint/parser',
      parserOptions: {
        ecmaVersion: 'latest',
        sourceType: 'module',
        project: './tsconfig.json',
      },
      rules: {
        '@typescript-eslint/consistent-type-imports': 'error',
        '@typescript-eslint/no-namespace': [
          'error',
          {
            allowDeclarations: true,
          },
        ],
      },
    },
    {
      files: ['*.jsx', '*.tsx'],
      extends: [
        'plugin:react/recommended',
        'plugin:react/jsx-runtime',
        'plugin:react-hooks/recommended',
      ],
      settings: {
        react: {
          version: 'detect',
        },
      },
      parserOptions: {
        ecmaFeatures: {
          jsx: true,
        },
      },
      rules: {
        'react/self-closing-comp': 'error',
        'react/sort-prop-types': 'error',
        'react/jsx-sort-props': 'error',
        'react/jsx-boolean-value': 'error',
        'react/jsx-closing-tag-location': 'error',
      },
    },
  ],
}

.prettierrc.cjs

/** @type {import('prettier').Options} */
module.exports = {
  astroAllowShorthand: true,
  arrowParens: 'avoid',
  bracketSameLine: false,
  bracketSpacing: true,
  endOfLine: 'lf',
  jsxSingleQuote: false,
  printWidth: 100,
  quoteProps: 'as-needed',
  semi: false,
  useTabs: false,
  tabWidth: 2,
  trailingComma: 'all',
  singleQuote: true,
}