Coder Social home page Coder Social logo

taoyage / yg-configs Goto Github PK

View Code? Open in Web Editor NEW
279.0 31.0 45.0 890 KB

CLI toolbox for common scripts for front-end projects

License: MIT License

Shell 1.01% JavaScript 97.05% TypeScript 1.95%
babel commitlint eslint lintstaged postcss stylelint swc swc-loader

yg-configs's Introduction

yg-configs 🛠📦

license npm

CLI toolbox for common scripts for my front-end projects


Table of Contents

Installation

$ npm install @taoyage/configs --save-dev
or
$ pnpm install @taoyage/configs -D

Usage

This can be a very helpful way to make editor integration work for tools like ESLint,babel,prettier,commitlint which require project-based configuration to be present to work.

config prettier

if we were to do this for prettier, you could create an .prettierrc.js with the contents of

module.exports = require('@taoyage/configs/prettier');

config eslint

if we were to do this for eslint of typescript react project, you could create an .eslintrc.js with the contents of

module.exports = require('@taoyage/configs/eslint-ts');

create tsconfig.json with the contents of

{
    "extends": "@taoyage/configs/shared-tsconfig",
    "compilerOptions": {},
    "exclude": [],
    "include": []
}

config commitlint

if were to do this for commitlint, you could create an .commitlintrc.js with the contents of

module.exports = require('@taoyage/configs/commitlint');

config lintstaged

if were to do this for lintstaged, you could create an .lintstagedrc.js with the contents of

module.exports = require('@taoyage/configs/lintstaged');

config stylelint

if were to do this for stylelint, you could create an .stylelintrc.js with the contents of

module.exports = require('@taoyage/configs/stylelint');

config postcss

if were to do this for postcss, you could create an postcss.config.js with the contents of

module.exports = require('@sk/configs/postcss');

config swc

if were to do swc-loader to webpack configure,you could import this swc configuration, this configuration suport typescript program. example of

  import swcOptions from '@taoyage/configs/swc-ts';

  module: {
    rules: [
      {
        test: /\.ts?x$/,
        use: {
          loader: 'swc-loader',
          options: swcOptions(rootPath, { isDev: false, override: {} }),
        },
      },
    ],
  },
params description type
rootPath tsconfig.json file path string
isDev current is dev or production bool
override swc compilation config object

config babel

if were todo babel-loader to webpack configure to react, you could create an .babelrc.js with content of

module.exports = {
    presets: [['@taoyage/configs/babel']],
};

TODO

  • eslint config
  • tsconfig
  • prettier
  • commitlint config
  • lintstage config
  • stylelint config
  • swc config
  • babel config
  • browserslist

yg-configs's People

Contributors

taoyage avatar yagetao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.