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

@atamaco/eslint-config-atama

v1.4.0

Published

ESLint for Atama Projects

Downloads

11

Readme

eslint-config-atama

ESLint config for Atama Projects.

Installation

npm i -D @atamaco/eslint-config-atama

Add an .eslintrc file to your project (the root generally). In it, add

{
  "extends": [
    "@atamaco/eslint-config-atama"
  ]
}

If you want to use it in a Next.js project use @atamaco/eslint-config-atama/next instead.

Also create a .prettierrc.js and add the following:

module.exports = {
  ...require('@atamaco/eslint-config-atama/.prettierrc.js'),
}

fin.

ESLint configurations

There are two configurations in this project:

  1. index.js has the base linting rules for TypeScript/Node projects
  2. next.js has the base linting rules for Next.js TypeScript projects

Other configurations

Commitlint

WARNING: Semi-experimental (we got this to work through trial and error but didn't see the exact method documented in the official docs)

In your project, setup / install commitlint - exact steps are slightly out of scope of this doc, but this is probably a good starting point:

npm install --save-dev @commitlint/{config-conventional,cli}
echo "module.exports = {extends: ['@atamaco/eslint-config-atama/commitlint.config.js']}" > commitlint.config.js
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'

They key here in case you missed it is the commitlint.config.js file references the commitlint config in the atamaco eslint config package:

module.exports = {extends: ['@atamaco/eslint-config-atama/commitlint.config.js']};

You should be able ot test this via

echo 'foo: bar' | npx commitlint (should fail) echo 'fix: bar' | npx commitlint (should pass without errors or output)

Stylelint

Stylelint can be added by adding the following to your .stylelintrc:

{
  "extends": ["eslint-config-typescript-shareable/.stylelintrc"]
}

Editorconfig

Unfortunately editorconfig can't be extended, so if you want editorconfig setup you'll have to copy the configuration over manually.

Contributing

Changes to this project can be made freely, but it's useful to know packages are published:

  1. When you commit a change, husky should enforce conventional commits
  2. When you land a PR to main, a Github Action is kicked off that
    1. will bump the version of the package based on the conventional commit message (e.g. feat: ... == minor bump, fix: ... == patch, etc)
    2. will publish a version of the package to NPM

Useful links

eslint docs

https://eslint.org/docs/developer-guide/shareable-configs

Good example repo

https://github.com/AxisCommunications/eslint-config-typescript-shareable