Git Product home page Git Product logo

fabric's Introduction

fabric代码规范

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

A collection of configuration files containing prettier, eslint, stylelint

Use

安装

npm i @juln/fabric -D
yarn add @juln/fabric -D

in .eslintrc.js

const path = require("path");

module.exports = {
  extends: [path.resolve('./node_modules/@juln/fabric')],

  rules: {
    // your rules
  },
};

module.exports = {
  extends: ['@juln/fabric'],

  rules: {
    // your rules
  },
};

in .prettierrc.js

const prettier = require('@juln/fabric/prettier');

module.exports = {
  ...prettier,
};

in .stylelintrc.js

module.exports = {
  extends: [require.resolve('@juln/fabric/stylelint')],
  rules: {
    // your rules
  },
};

相关问题

  1. @typescript-eslint/no-unused-var 误报

@typescript-eslint/no-unused-vars 规则在极少数情况下会误报。 比如下面这段代码, ts函数类型定义,函数中的参数会被当作真实变量被判断。

type Fn = (arg: any) => void; // arg 误报

解决方案: 使用@typescript-eslint/no-unused-vars-experimental代替@typescript-eslint/no-unused-vars。但是lint速度会很明显变慢很多

// .eslintrc.js
module.exports = {
  extends: ['@juln/fabric'],
  rules: {
    '@typescript-eslint/no-unused-vars': 'off',
    '@typescript-eslint/no-unused-vars-experimental': 'error',
  },
};

fabric's People

Contributors

z-juln avatar

Stargazers

 avatar

Watchers

 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.