@agnostopia/core-dev
core dev configs
Last updated 2 months ago by nicocevallos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @agnostopia/core-dev 
SYNC missed versions from official npm registry.

Core Dev Configuration (opinionated)

What does it include?

powered by pnpm

Basics

Install this package

pnpm i -D @agnostopia/core-dev

Copy .gitignore and .editorconfig files from node_modules/@agnostopia/core-dev/configs folder.

Format and linting

Install dependencies

pnpm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-config-xo eslint-config-xo-typescript eslint-plugin-prettier prettier typescript

Then add the files:

.eslintrc.js or copy from node_modules/@agnostopia/core-dev/configs folder.

module.exports = require("@agnostopia/core-dev").eslint;

.prettierrc.js or copy from node_modules/@agnostopia/core-dev/configs folder.

module.exports = require("@agnostopia/core-dev").prettier;

TypeScript config

Easily extends basic tsconfig files. Or copy from node_modules/@agnostopia/core-dev/configs folder.

use dev.json for development purpose

{
    "extends": "./node_modules/@agnostopia/core-dev/tsconfigs/dev.json"
}

Or pack.json to use with @pika/pack with TypeScript package

{
    "extends": "./node_modules/@agnostopia/core-dev/tsconfigs/pack.json",
    "include": [
        "./src/**/*.ts"
    ]
}

Husky & lint staged

Install dependencies

pnpm i -D husky lint-staged

Then add the files:

.huskyrc.js or copy from node_modules/@agnostopia/core-dev/configs folder.

module.exports = require("@agnostopia/core-dev").husky;

lint-staged.config.js or copy from node_modules/@agnostopia/core-dev/configs folder.

module.exports = require("@agnostopia/core-dev").lintStaged;

AVA & nyc

Install dependencies

pnpm i -D ava esm nyc ts-node

Then add the files:

ava.config.cjs or copy from node_modules/@agnostopia/core-dev/configs folder.

module.exports = require("@agnostopia/core-dev").ava

nyc.config.js or copy from node_modules/@agnostopia/core-dev/configs folder.

module.exports = require("@agnostopia/core-dev").nyc;

Finally, add Test and Test Coverage scripts to package.json scripts.

{
    "scripts": {
        "test": "ava -t",
        "test-cov": "nyc ava"
    }
}

Current Tags

  • 0.0.6                                ...           latest (23 days ago)

5 Versions

  • 0.0.6                                ...           23 days ago
  • 0.0.5                                ...           a month ago
  • 0.0.4                                ...           2 months ago
  • 0.0.3                                ...           2 months ago
  • 0.0.2                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 27
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |