Skip to content

minko-fe/any-config

Repository files navigation

any-config

A collection of configuration files for eslint, prettier, commitlint, and tsconfig. eslint/prettier/commitlint/tsconfig 的配置集合库

eslint

install

npm install eslint @minko-fe/eslint-config -D

eslint.config.js

import { defineConfig } from '@minko-fe/eslint-config'

export default defineConfig(
  [
    // your config
  ],
  {
    react: false, // up to you
    vue: false, // up to you
    // ...
  },
)

prettier

install

npm install @minko-fe/prettier -D

如果你的项目中使用到了 svelteastrotailwindcss,请额外安装其对应的 prettier plugin

例如,你的项目中使用了 tailwindcss,请

npm install prettier-plugin-tailwindcss -D

prettier配置 ( )

package.json

{
  "prettier": "@minko-fe/prettier-config"
}

.prettierrc.js

如果你需要重写或新增一些配置,请使用此方式

module.exports = {
  ...require('@minko-fe/prettier-config'),
  // 在这里加配置
}

commitlint

install

npm install @minko-fe/commitlint-config -D

commitlint.config.js

module.exports = {
  extends: ['@minko-fe'],
}

or

package.json

{
  "commitlint": {
    "extends": ["@minko-fe"]
  }
}

tsconfig

install

npm install @minko-fe/tsconfig

tsconfig.json

app

{
  "extends": "@minko-fe/tsconfig/tsconfig.app.json"
}

lib

{
  "extends": "@minko-fe/tsconfig/tsconfig.lib.json"
}

About

Get any config from here. So easy. 🤞

Resources

Stars

Watchers

Forks

Packages

No packages published