eslint-config-typescript-library

0.3.0 • Public • Published

eslint-config-typescript-library

npm version

ESLint config for TypeScript Library

Features

  • Indent with 2 spaces and always semicolon
  • Best practice with jstsreact or their bundle!

Install

npm i -D eslint-config-typescript-library
# OR: npm install -D eslint eslint-config-typescript-library

Usage

Lint All

In .eslintrc.js:

module.exports = {
  extends: ["eslint-config-typescript-library"],
};

This enable lint for both jsts and react! you'll also need typescript as a devDependency at your project.

Lint TypeScript

In .eslintrc.js:

module.exports = {
  extends: ["eslint-config-typescript-library/ts"],
};

You need specify --ext explicitly to enable TypeScript linting:

{
  "lint": "eslint src/** --ext .js,.jsx,.ts,.tsx --fix"
}

Lint JavaScript

In .eslintrc.js:

module.exports = {
  extends: ["eslint-config-typescript-library/js"],
};

Lint React

In .eslintrc.js:

module.exports = {
  extends: ["eslint-config-typescript-library/react"],
};

License

MIT © ULIVZ

Package Sidebar

Install

npm i eslint-config-typescript-library

Weekly Downloads

2

Version

0.3.0

License

none

Unpacked Size

17.3 kB

Total Files

7

Last publish

Collaborators

  • ulivz