@kcinternal/configuration

internal modules for kc monots projects

Usage no npm install needed!

<script type="module">
  import kcinternalConfiguration from 'https://cdn.skypack.dev/@kcinternal/configuration';
</script>

README

Configuration collection

TITLE LATEST NEXT
Version latest next
Size latest next

Eslint config

Required:

  1. eslint, prettier and typescript installed in root project / current project
  2. @typescript-eslint/eslint-plugin and @typescript-eslint/parser for support typescript parser in eslint
  3. eslint-config-prettier and eslint-plugin-prettier for enable default config of eslint

Optional:

  1. eslint-plugin-react if you want to support react
const { eslint } = require("@kcinternal/configuration");
const config = eslint(__dirname).build();
module.exports = config

Webpack config

Required:

  1. 2 libraries installed at root project webpack and webpack-cli
const { webpack } = require("@kcinternal/configuration");
const config = webpack(__dirname).build();
module.exports = config

Babel config

Required:

  1. @babel/cli, @babel/preset-env and @babel/preset-typescript must install as devDependencies in root project
  2. If you use babel runtime, you must installed following dependencies (more)
    1. @babel/plugin-transform-runtime must installed as devDependencies in root project
    2. @babel/runtime must installed as dependencies in each modules using babel compiler
const { babel } = require("@kcinternal/configuration");

const config = babel(__dirname);
module.exports = function(api) {
  api.cache(true);

  return config.build();
}