eslint-config-codetakt-ts
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

eslint-config-codetakt-ts

Opinionated eslint config for TypeScript and (optionally) React projects.

Installation

# Add peer dependencies
yarn add -D @eslint/js eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks typescript typescript-eslint
# Add this package
yarn add -D eslint-config-codetakt-ts

Configuration

import codetaktTs from 'eslint-config-codetakt-ts'

export default [
  ...codetaktTs.configs.all,
  // You can customize rules here.
]

Customize config for no-restricted-imports rules

You can customize it by importing the config object placed as separated file.

import { merge } from 'webpack-merge'
import { noRestrictedImportsRules } from 'eslint-config-codetakt-ts'
const noRestrictedImportsRulesWithoutLayoutEffect = merge(
  noRestrictedImportsRules,
  {
    // Your config goes here.
  }
)

(webpack-merge is convenient for merging nested array/object structure)

Philosophy

  • Catch common mistakes but not to be too strict/verbose.
  • Use standards like js/recommended and prettier for base config.
  • Enable migration to latest syntax by linting.
  • For @typescript-eslint:
    • Disable strict style config which not included in js/recommended, like no-empty-function.
    • Please consider to use @typescript-eslint/no-explicit-any in your config. It is currently not included.
    • TODO: Consider including @typescript-eslint/recommended-requiring-type-checking.

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-config-codetakt-ts

Weekly Downloads

132

Version

3.0.0

License

MIT

Unpacked Size

9.48 kB

Total Files

9

Last publish

Collaborators

  • ypresto
  • takeru
  • megos
  • tompng
  • innparusu
  • hanachin
  • taichiro