@indooorsman/typescript-eslint
TypeScript icon, indicating that this package has built-in type declarations

8.14.0 • Public • Published

@indooorsman/typescript-eslint

This is a bundled esm package of @typescript-eslint/eslint-plugin & @typescript-eslint/parser, it's super fast to be resolved & downloaded ⚡️⚡️⚡️

Installation

npm i -D @indooorsman/typescript-eslint
# or
yarn add -D @indooorsman/typescript-eslint

Usage

please use in new eslint config file (https://eslint.org/docs/latest/use/configure/configuration-files-new)

// eslint.config.js
import js from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import {
  parser as tsParser,
  plugin as tsPlugin,
  configs as tslintConfigs
} from '@indooorsman/typescript-eslint';

export default [
  js.configs.recommended,
  {
    files: ['**/*.ts', '**/*.tsx'],
    languageOptions: {
      ecmaVersion: 'latest',
      sourceType: 'module',
      parser: tsParser,
      parserOptions: {
        ecmaFeatures: {
          jsx: true
        },
        sourceType: 'module',
        lib: ['ESNext', 'DOM', 'DOM.Iterable'],
        project: ['./tsconfig.json']
      }
    },
    plugins: {
      import: importPlugin,
      '@typescript-eslint': tsPlugin
    },
    settings: {
      'import/parsers': {
        espree: ['.js', '.jsx', '.cjs', '.mjs'],
        // use with eslint-plugin-import
        '@indooorsman/typescript-eslint/parser': ['.ts', '.tsx', '.d.ts']
      }
    },
    rules: {
      // recommended rules
      ...tslintConfigs.recommended.reduce((ret, item) => Object.assign(ret, item.rules ?? {}), {}),

      // your own rules
      '@typescript-eslint/consistent-type-exports': 'error'
    }
  }
];

Package Sidebar

Install

npm i @indooorsman/typescript-eslint

Weekly Downloads

54

Version

8.14.0

License

MIT

Unpacked Size

1.21 MB

Total Files

7

Last publish

Collaborators

  • indooorsman