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

@natahouse/eslint-config

v1.3.0

Published

ESLint configuration used by nata.house

Downloads

22

Readme

💻 Overview

This project provides a centralized ESLint configuration for projects utilizing Next.js, React, and Node.js. This configuration aims to enhance code quality, enforce best practices, and streamline the development process, by maintaining a consistent set of linting rules.

🌟 Features

@@ Next.js Ready: @@ 
Tailored rules for projects built with Next.js,
ensuring optimal linting for Next.js applications.

@@ React Guidelines: @@ 
Comprehensive linting rules specific to React, 
promoting clean and maintainable React code.

@@ Node.js Support: @@
Inclusive rules for Node.js applications, addressing common issues 
and ensuring code consistency across the full stack.

@@ Easy Integration: @@
Straightforward integration into your project, saving
development time and reducing configuration overhead.

🚀 Getting Started

To integrate this ESLint configuration into your project, follow these steps:

## Use your preferred package manager to install
$ yarn add -D @natahouse/lint-config
## OR
$ npm install --save-dev @natahouse/lint-config

Using in ReactJS (without NextJS)

inside the .eslintrc.json file

{
  "extends": "@natahouse/lint-config/react"
}

Using in NextJS

inside the .eslintrc.json file

{
  "extends": [
    "@natahouse/lint-config/next",
    "next/core-web-vitals",
  ]
}

Using in NodeJS

inside the .eslintrc.json file

{
  "extends": "@natahouse/lint-config/node"
}

🎨 Style rules

Prettier Configuration

The following table outlines the configuration rules for Prettier, a code formatter.

| Rule | Value | Description | | -------------------------- | ------------ | ----------------------------------------------------- | | printWidth | 80 | Specifies the maximum line length for your code. | | tabWidth | 2 | Sets the number of spaces per indentation level. | | singleQuote | false | Controls the usage of single or double quotes. | | trailingComma | "all" | Adds a trailing comma wherever possible (ES5+). | | arrowParens | "always" | Enforces parentheses around a sole arrow function | | semi | true | Adds semicolons at the end of statements. | | endOfLine | "auto" | Defines the line ending style for your files. |


ESLint Configuration for ReactJS

This ESLint configuration is tailored for projects using React.js, providing a set of rules to enhance code quality, enforce best practices, and improve maintainability. It extends popular configurations such as plugin:react/recommended, plugin:react-hooks/recommended, standard, plugin:@typescript-eslint/recommended, and plugin:prettier/recommended.

| Rule | Value | Description | | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------- | | react/self-closing-comp | "error" | Enforces self-closing components in React to improve consistency. | | react/react-in-jsx-scope | "off" | Allows JSX to be used without importing React explicitly (not necessary in newer React versions). | | react/prop-types | "off" | Disables the requirement for prop types in React components, suitable for TypeScript projects. | | jsx-a11y/alt-text | "warn" | Warns about missing alt text in img elements with optional elements customization. | | jsx-a11y/aria-props | "warn" | Warns about problematic usage of ARIA props. | | jsx-a11y/aria-proptypes | "warn" | Warns about missing ARIA propTypes. | | jsx-a11y/aria-unsupported-elements | "warn" | Warns about unsupported ARIA elements. | | jsx-a11y/role-has-required-aria-props | "warn" | Warns about missing required ARIA props for certain roles. | | jsx-a11y/role-supports-aria-props | "warn" | Warns about unsupported ARIA props for certain roles. | | react/no-unknown-property | "error" | Flags the usage of unknown DOM properties in React components. |


ESLint Configuration for NextJS

This ESLint configuration is tailored for projects using Next.js, providing a set of rules to enhance code quality, enforce best practices, and improve maintainability. It extends popular configurations such as standard, plugin:@typescript-eslint/recommended, and plugin:prettier/recommended.

| Rule | Value | Description | | ---------------------------------------- | ------- | --------------------------------------------------------------------------------------------- | | prettier/prettier | "error" | Prettier configuration for consistent code formatting. | | jsx-a11y/alt-text | "warn" | Warns about missing alt text in img elements with optional elements customization. | | jsx-a11y/aria-props | "warn" | Warns about problematic usage of ARIA props. | | jsx-a11y/aria-proptypes | "warn" | Warns about missing ARIA propTypes. | | jsx-a11y/aria-unsupported-elements | "warn" | Warns about unsupported ARIA elements. | | jsx-a11y/role-has-required-aria-props | "warn" | Warns about missing required ARIA props for certain roles. | | jsx-a11y/role-supports-aria-props | "warn" | Warns about unsupported ARIA props for certain roles. |


Made with ♥ by nata.house 👋🏻