preflower / eslint-config

My eslint config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-config-ted

My Eslint Rules

  • Base on Standard
  • Provide Typescript / Vue / React Support
  • Provide JSON Support

Usage

Default

pnpm i -D eslint eslint-config-ted

Config .eslintrc

{
  "extends": [
    "ted"
  ]
}

TS

pnpm i -D typescript

Config .eslintrc

{
  "extends": [
    "ted",
    "ted/typescript"
  ],
  "parserOptions": {
    "project": [
      './tsconfig.json'
    ]
  }
}

Vue

Config .eslintrc

{
  "extends": [
    "ted",
    "ted/vue"
  ]
}

With TS

Config .eslintrc

{
  "extends": [
    "ted",
    "ted/vue",
    "ted/typescript"
  ],
  "parser": "vue-eslint-parser",
  "parserOptions": {
    "parser": "@typescript-eslint/parser",
    "project": [
      "./tsconfig.json"
    ],
    "extraFileExtensions": [".vue"]
  }
}

Known Issues

  • props type cannot be infered in template expression when not import vue related api

React

Config .eslintrc

{
  "extends": [
    "ted",
    "ted/react"
  ]
}

With TS

Config .eslintrc

{
  "extends": [
    "ted",
    "ted/react",
    "ted/typescript"
  ]
}

Known Issues

When i use with typescript, i can't check .js file?

this because lint conflict with js and ts, right now is not support use both of them.

License

MIT

Inspired by

About

My eslint config

License:MIT License


Languages

Language:JavaScript 71.8%Language:Vue 22.2%Language:TypeScript 4.7%Language:Shell 1.2%