@worktile-devkit/config
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.24 • Public • Published

@worktile-devkit/config

General configuration extraction, such as prettier

Usage

Prettier Config

add .prettierrc.js or prettier.config.js in repo root folder, and copy bellow code to it.

const { prettier } require("@worktile-devkit/config");

// prettier.config.js or .prettierrc.js
module.exports = {
    ...prettier.backendConfig, // prettier.frontendConfig
    custom config
}

The base config is:

export const baseConfig = {
    eslintIntegration: true,
    stylelintIntegration: true,
    tabWidth: 2,
    semi: true,
    printWidth: 140,
    proseWrap: 'preserve',
    trailingComma: 'none',
    overrides: [
        {
            files: '*.js',
            options: {
                tabWidth: 4
            }
        },
        {
            files: '*.ts',
            options: {
                tabWidth: 4
            }
        },
        {
            files: '*.scss',
            options: {
                tabWidth: 4
            }
        },
        {
            files: '*.css',
            options: {
                tabWidth: 4
            }
        }
    ]
};

the frontendConfig is combination of baseConfig and below

{
    singleQuote: true
}

the backendConfig is the same as baseConfig

Readme

Keywords

none

Package Sidebar

Install

npm i @worktile-devkit/config

Weekly Downloads

30

Version

1.0.0-beta.24

License

ISC

Unpacked Size

15 kB

Total Files

24

Last publish

Collaborators

  • why520crazy