配置TSLint——学习笔记

每次用ant的生态,总觉得很棒,因为自带了eslint,prettier和stylelint,就觉得很规范,所以我准备在即将开发的博客后台管理的服务端配置上tslint来规范自己的代码风格

首先记录下依赖项目

接着还有 prettier
webstorm 集成了 prettier,所以一直在用,真的很好用
自从学了前端,最经常按的键已经从Ctrl + S变成了Ctrl + Shift + P ,prettier 快捷键哈哈

再贴上.eslintrc.json

{
    "parser": "@typescript-eslint/parser",
    "plugins": ["@typescript-eslint"],
    "parserOptions": {
        "project": "./tsconfig.json",
        "ecmaVersion": 2018,
        "sourceType": "module"
    },
    "rules": {
        "prettier/prettier": "error"
    },
    "env": {
        "node": true
    },
    "extends": [
        "airbnb-base",
        "plugin:@typescript-eslint/recommended",
        "prettier",
        "prettier/@typescript-eslint",
        "plugin:prettier/recommended"
    ]
}

确实不太熟悉,配置也是照着来的,完全不明白自定义什么诶😂
先记录这点儿,开发过程出了问题再边调试边记录~

1 Reply to “配置TSLint——学习笔记”

  1. Good day! zhangyu1818.com

    We offer

    Sending your commercial proposal through the Contact us form which can be found on the sites in the contact section. Contact form are filled in by our application and the captcha is solved. The advantage of this method is that messages sent through feedback forms are whitelisted. This method raise the chances that your message will be open. Mailing is done in the same way as you received this message.
    Your commercial offer will be read by millions of site administrators and those who have access to the sites!

    The cost of sending 1 million messages is $ 49 instead of $ 99. (you can select any country or country domain)
    All USA – (10 million messages sent) – $399 instead of $699
    All Europe (7 million messages sent)- $ 299 instead of $599
    All sites in the world (25 million messages sent) – $499 instead of $999

    Discounts are valid until April 30.
    Feedback and warranty!
    Delivery report!
    In the process of sending messages we don’t break the rules GDRP.

    This message is automatically generated to use our contacts for communication.

    Contact us.
    Telegram – @FeedbackFormEU
    Skype – FeedbackForm2019
    Email – FeedbackForm@make-success.info

    Thank you for your attention.

Leave a Reply

Your email address will not be published. Required fields are marked *