@amjs/js-fw

1.0.0 • Public • Published

@amjs/js-fw

version

Framework tools to work in any CJS source code.

What's included:

  • Default configuration for BabelJS.
  • Unitary testing solution with Jest.
  • Default configuration with EslintJS for linting any *.m?js source code.

NOTICE: The linting configuration is strongly opinionated.

Checkout configuration at .estlintrc.js file.

Installation

npm i --save-dev @amjs/js-fw

Add this to your package.json scripts:

{
    "scripts": {
        "test": "NODE_ENV=test node node_modules/@amjs/js-fw/scripts/test",
        "lint:js:check": "node node_modules/@amjs/js-fw/scripts/lint",
        "lint:js:fix": "node node_modules/@amjs/js-fw/scripts/lint -- --fix"
    }
}

How to extend default configurations

In your project root folder you can extend locally any of provided .babelrc.js, .eslintrc.js or jest.config.js configuration files.

In the following example you can see how to override the semi rule of Eslint, for example:

// at your local ".eslintrc.js" file
const defaultConfig = require('@amjs/js-fw/.eslintrc.js');

defaultConfig.rules.semi = 0;

module.exports = defaultConfig;

Package Sidebar

Install

npm i @amjs/js-fw

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

25.8 kB

Total Files

11

Last publish

Collaborators

  • amjs