@alljoint-next/eslint-config-typescript

0.3.17 • Public • Published

ESLintConfigTypeScript

The ESLint Config Be Used For AllJointNext

Usage

  1. Installation
yarn add eslint prettier typescript @alljoint-next/eslint-config-typescript --dev
# npm install eslint prettier typescript @alljoint-next/eslint-config-typescript --save-dev

# install the ts-config we suggest or you can add specific .tsconfig by yourself
yarn add @alljoint-next/ts-config --dev
# npm install @alljoint-next/ts-config --save-dev
  1. Setup Configuration
echo '{ "extends": "@alljoint-next/eslint-config-typescript" }' > .eslintrc.json
echo '**/node_modules/**
./node_modules/**
**/.{git,svn,hg}/**
./.{git,svn,hg}/**
**/dist/**
./dist/**' > .eslintignore
echo '{ "extends": "@alljoint-next/ts-config" }' > tsconfig.json
  1. Add Scripts package.json
{
  "scripts": {
    "format": "prettier '**/*.{js,json,ts,vue,md,yml,yaml}' !**/dist/** !./dist/** !**/coverage/** --write --no-semi --single-quote --trailing-comma none && yarn lint --fix",
    "lint": "eslint '**/*.ts'"
  }
}

Advanced

Lint .js and .ts file in the same time

  1. Installation
yarn add eslint prettier typescript @alljoint-next/eslint-config @alljoint-next/eslint-config-typescript --dev
# npm install eslint prettier typescript @alljoint-next/eslint-config @alljoint-next/eslint-config-typescript --save-dev

# install the ts-config we suggest or you can add specific .tsconfig by yourself
yarn add @alljoint-next/ts-config --dev
# npm install @alljoint-next/ts-config --save-dev
  1. Setup Configuration
echo '{
  "extends": "@alljoint-next/eslint-config",
  "overrides": [
    {
      "files": ["*.ts"],
      "extends": "@alljoint-next/eslint-config-typescript"
    }
  ]
}' > .eslintrc.json
echo '**/node_modules/**
./node_modules/**
**/.{git,svn,hg}/**
./.{git,svn,hg}/**
**/dist/**
./dist/**' > .eslintignore
echo '{ "extends": "@alljoint-next/ts-config" }' > tsconfig.json

Readme

Keywords

none

Package Sidebar

Install

npm i @alljoint-next/eslint-config-typescript

Weekly Downloads

13

Version

0.3.17

License

GPL-3.0

Unpacked Size

46.3 kB

Total Files

5

Last publish

Collaborators

  • trylovetom