Coder Social home page Coder Social logo

eslint-config-by-myself's Introduction

eslint-config-dc

定川前端通用基础eslint规则

TODO

  • sort-string-array 规则开发

  • 集成eslint-config-prettier,sfc的render缩进格式化需要依赖prettier

    需要共享.prettierrc.js.vscode/settings.json。Prettier格式化比较难自定义,要再实践实践

安装

  1. 连接esay-connect

  2. ref: http://192.168.2.130:9001/package/@dc/eslint-config-dc

    # 设置npm下载源为定川私有源
    npm config set registry http://192.168.2.130:9000
    # 安装eslint配置包
    npm install @dc/eslint-config-dc --save-dev 

配置

项目根目录下创建.eslintignore,内容为:

/*
!/src

# It is not possible to re-include a file if a parent directory of that file is excluded. 
# ref: https://git-scm.com/docs/gitignore#_pattern_format

项目根目录下创建.eslintrc.json,内容为:

{
    "extends": "@dc/dc/vue"
}

vscode安装eslint插件,之后在vscode的配置中添加:

// 文件保存时执行eslint的fix功能
"editor.codeActionsOnSave": {
    "source.fixAll": true,
}

eslint-config-by-myself's People

Contributors

hq229075284 avatar panda-my-love avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.