JSPM

  • Created
  • Published
  • Downloads 146356
  • Score
    100M100P100Q171797F
  • License MIT

ESLint shareable config for TypeScript to be used with eslint-config-xo

Package Exports

  • eslint-config-xo-typescript

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-config-xo-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-config-xo-typescript Build Status

ESLint shareable config for TypeScript to be used with eslint-config-xo

Install

$ npm install --save-dev eslint-config-xo eslint-config-xo-typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin

Usage with XO

XO has built-in support for TypeScript, using this package under the hood, so you do not have to configure anything.

Standalone Usage

Add some ESLint config to your package.json (or .eslintrc):

{
    "name": "my-awesome-project",
    "eslintConfig": {
        "extends": [
            "xo",
            "xo-typescript"
        ]
    }
}

Use the space sub-config if you want 2 space indentation instead of tabs:

{
    "name": "my-awesome-project",
    "eslintConfig": {
        "extends": [
            "xo",
            "xo-typescript/space"
        ]
    }
}

Note: If your tsconfig.json is not in the same directory as package.json, you will have to set the path yourself:

{
    "name": "my-awesome-project",
    "eslintConfig": {
        "extends": [
            "xo",
            "xo-typescript"
        ],
        "parserOptions": {
            "project": "some-path/tsconfig.json"
        }
    }
}