Giter VIP home page Giter VIP logo

fbi-lint's Introduction

fbi-lint

一个包含 prettier,eslint,stylelint 的配置文件集合

使用

.prettierrc.js

const lint = require('fbi-lint').prettier
module.exports = {
  ...lint,
  //... 你的配置项
}

.eslintrc.js

// node  require('fbi-lint').nodeEslint
// js/ts require('fbi-lint').eslint
// vue  require('fbi-lint').vueEslint
// react require('fbi-lint').reactEslint
const lint = require('fbi-lint').eslint
module.exports = {
  ...lint,
  rules: {
    ...lint.rules,
    // 你的规则
  },
  // 你的配置项
}

.stylelintrc.js

const lint = require('fbi-lint').stylelint
module.exports = {
  ...lint,
}

说明

目前该包里面包含了一些基本配置,具体的一些公共的规则需要完善

  • javaScript/typescript 的 eslint 配置项
  • vue 环境的 eslint 配置项
  • react 环境的 eslint 配置项

vscode 的 settings.json 可以使用以下配置来保证开发体验(额外说明:如果同时安装了 vetur 和 prettier 插件,需要指定以下.vue 文件的以 prettier 来 format,不然 vetur 的 format 会和 eslint+prettier 冲突)

{
  "eslint.alwaysShowStatus": true,
  "eslint.format.enable": true,
  "editor.formatOnSave": true,
  "eslint.validate": ["javascript", "javascriptreact", "vue"],
  "vetur.validation.template": false,
  "[vue]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

参考

fbi-lint's People

Contributors

neikvon avatar taomas avatar yzstrive avatar

Watchers

 avatar  avatar  avatar

Forkers

yzstrive onweer

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.