npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mornya/lintest

v1.4.0

Published

Integrated lint and test environment project (personal public version)

Downloads

927

Readme

Lintest

version node types downloads license Copyright 2020. mornya. All rights reserved. This is personal public version (Use @lintest/cli for enterprise only).

About

Integrated lint and test environment project.

Features

  • TypeScript / ES6+ support with TypeScript.
  • Linting TypeScript / JavaScript codes with ESLint.
  • Testing codes with Jest.
  • All available for Node.js / React.js / Vue.js (Nuxt.js) application

Installation

해당 라이브러리는 글로벌로 설치하거나 프로젝트 내에 설치할 수 있다.

npm 대신 yarn 사용시, 프로젝트 루트 경로에 package-lock.json 파일이 존재하면 제거하고 yarn.lock 파일만 참조되도록 한다.

$ npm install --save-dev @mornya/lintest
or
$ yarn add -D @mornya/lintest

글로벌 설치를 위해서는 아래와 같이 실행한다.

$ npm install -g @mornya/lintest
or
$ yarn global add @mornya/lintest

Execution

CLI

린트 및 테스트 수행은 CLI로 실행한다. lintest가 글로벌 모듈로 설치 되어있는 경우 커맨드라인에서 아래와 같이 실행 할 수 있다.

# 린트 실행시
$ lintest lint [fix|debug|nocache]

# 테스트 실행시
$ lintest test [watch|coverage|nocache]

린트 및 테스트 환경설정 내용이 필요할 경우 export 명령을 사용하여 환경설정을 참고할 수 있다. 수행결과는 프로젝트 루트 경로에 eslint.config.jsonjest.config.json 파일이 생성된다. 만약 정상적인 출력이 되지 않는다면 debug 파라미터로 확인한다.

$ lintest export [debug]

NPM

NPM 프로젝트에서는 npm run 명령으로 실행되도록 아래와 같이 package.json 파일 내에 설정한다.

{
  "scripts": {
    "lint": "lintest lint",
    "lint:fix": "lintest lint fix",
    "lint:debug": "lintest lint debug nocache",
    "test": "lintest test",
    "test:watch": "lintest test watch",
    "test:coverage": "lintest test coverage nocache"
  }
}

Test setup files

각 단위 테스트를 수행하기 전 mocking method나 초기 설정을 할 수 있도록 셋업 파일을 추가 할 수 있다. 적용될 테스트 셋업 파일은 아래 목록에서 존재하는 파일을 찾아 사용하게 된다.

자세한 내용은 Jest 관련 문서를 참고.

<rootDir>/src/test/@setup.ts (or .js)
<rootDir>/test/@setup.ts (or .js)
<rootDir>/test-setup.ts (or .js)

Change Log

해당 프로젝트의 변경사항은 CHANGELOG.md 파일 참조.

License

해당 프로젝트의 라이센스는 LICENSE 파일 참조.