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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gtf-eslint

v1.0.6

Published

Configurações otimizadas do ESLint para projetos React e Node.js com TypeScript, seguindo os mais recentes padrões do typescript-eslint.

Readme

GTF ESLint Config

Configurações otimizadas do ESLint para projetos React e Node.js com TypeScript, seguindo os mais recentes padrões do typescript-eslint.

🚀 Características

  • Linting com Type Information: Configuração completa com projectService: true para análise estática avançada
  • Configurações separadas: React (TSX) e Node.js com regras específicas para cada ambiente
  • Regras modernas: Inclui todas as configurações recomendadas, strict e stylistic do typescript-eslint
  • Integração Prettier: Configuração otimizada para formatação consistente
  • Suporte React: Regras específicas para React Hooks, Refresh e DOM
  • Performance otimizada: Usa projectService em vez de project para melhor performance

📦 Instalação

pnpm add -D gtf-eslint

🔧 Uso

Para projetos React

// eslint.config.js
import reactConfig from 'gtf-eslint/react';

export default reactConfig;

Para projetos Node.js

// eslint.config.js
import nodeConfig from 'gtf-eslint/node';

export default nodeConfig;

⚡ Principais Melhorias Implementadas

1. Linting com Type Information

  • Substituído project por projectService: true para melhor performance
  • Configurações recommendedTypeChecked, strictTypeChecked e stylisticTypeChecked
  • Análise estática completa com informações de tipos do TypeScript

2. Configurações Separadas por Tipo de Arquivo

  • TypeScript/TSX: Linting completo com type checking
  • JavaScript/JSX: Linting sem type checking para compatibilidade
  • Configurações específicas: React para frontend, Node.js para backend

3. Regras Avançadas do TypeScript

  • @typescript-eslint/prefer-nullish-coalescing: Força uso de ?? em vez de ||
  • @typescript-eslint/prefer-optional-chain: Força uso de ?. para acesso seguro
  • @typescript-eslint/consistent-type-imports: Imports de tipos consistentes
  • @typescript-eslint/no-unnecessary-condition: Detecta condições desnecessárias

4. Configurações de Estilo

  • React: printWidth: 120, semi: false (padrão React)
  • Node.js: printWidth: 80, semi: true (padrão Node.js)
  • Integração com prettier-plugin-tailwindcss para React

5. Performance e Compatibilidade

  • projectService: true para melhor performance em projetos grandes
  • Suporte para arquivos .mjs e .js
  • Configurações específicas para diferentes ambientes

📋 Regras Principais

TypeScript (Com Type Checking)

  • Análise estática completa de tipos
  • Detecção de uso inseguro de any
  • Verificação de condições desnecessárias
  • Imports e exports de tipos consistentes

React

  • Regras para React Hooks
  • Fast Refresh para desenvolvimento
  • Regras específicas para JSX/TSX
  • Integração com React DOM

Node.js

  • Regras específicas para ambiente Node.js
  • Prevenção de operações síncronas bloqueantes
  • Verificação de paths seguros

🔍 Troubleshooting

Erro de Type Information

Se você receber erros sobre type information, verifique se:

  1. Seu tsconfig.json está configurado corretamente
  2. O tsconfigRootDir está apontando para o diretório correto
  3. Todas as dependências do TypeScript estão instaladas

Performance

  • projectService: true é mais rápido que project para projetos grandes
  • O linting tipado pode ser mais lento inicialmente, mas oferece análises mais profundas
  • Use em IDEs para melhor experiência de desenvolvimento

📚 Referências

🤝 Contribuição

Contribuições são bem-vindas! Por favor, abra uma issue ou pull request para melhorias.

📄 Licença

ISC