Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@futagoza/eslint-config-typescript

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@futagoza/eslint-config-typescript

Futago-za Ryuu's ESLint configurations for TypeScript projects.

latest
Source
npmnpm
Version
16.1.0
Version published
Weekly downloads
47
-47.78%
Maintainers
1
Weekly downloads
 
Created
Source

dependencies History License

This package contains configuration files for ESLint v7.15+

This is a configuration file for ESLint that is used to lint my TypeScript projects.

NOTE 1: This configuration will only check for @typescript-eslint/* rules, therefore it is recommended to also use @futagoza/eslint-config-javascript or something similar alongside this configuration.

NOTE 2: This configuration require's TypeScript, but the peerDependencies field is set as "typescript": "*" so that any version of TypeScript supported by the Typescript-ESLint project can be used.

installation

$ npm i --save-dev @futagoza/eslint-config-typescript

usage

Put the following into your configuration (.eslintrc.* file or the "eslintConfig" field in package.json):

{
    "extends": "@futagoza/typescript"
}

configurations

A list of usable configurations as well the configurations they use:

  • @futagoza/typescript (default, extends extension-rules)
  • @futagoza/typescript/extension-rules (extends eslint-overrides)
  • @futagoza/typescript/eslint-overrides

The eslint-overrides configuration is tailored either to switch off or alter core ESLint rules so that @typescript-eslint/eslint-plugin can do it's job and no unnecessary checks are made. It is not recommended to use this directly!

tsconfig.json

@typescript-eslint/eslint-plugin requires a tsconfig.json in the current working directory to function correctly, but I believe in zero-config, so what this configuration does is the following in order:

  • Try to load tsconfig.eslint.json from the current working directory
  • Try to load tsconfig.json from the current working directory
  • Create and load a temporary tsconfig.json for the current working directory

If the third choice is reached, this configuration will create a temporary tsconfig.json (based on the built-in tsconfig.default.json) in the user's temporary directory with path's linked to the current working directory so that it functions like a normal tsconfig.json (albeit slightly opinionated). This is a great alternative to the createDeafultProgram option provided by @typescript-eslint/eslint-plugin as it can have performance issues (e.g. I've had VS Code slow down).

license

Copyright © 2019+ Futago-za Ryuu
Released under the MIT License, http://opensource.org/licenses/MIT

Keywords

eslint

FAQs

Package last updated on 23 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts