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

@durumim/eslint-config

v1.0.6

Published

Shared ESLint configuration for Durumim UI projects

Downloads

55

Readme

@durumim/eslint-config

Shared ESLint configuration for Durumim UI projects.

Description

This package provides a shared ESLint configuration for projects that utilize React and TypeScript. It includes rules and plugins to ensure code quality and consistency across all Durumim UI projects.

Installation

First, install the package and its peer dependencies:

npm install --save-dev @durumim/eslint-config eslint typescript

Or, if you are using yarn:

yarn add --dev @durumim/eslint-config eslint typescript

Or, if you are using pnpm:

pnpm add --D @durumim/eslint-config eslint typescript

Usage

To use this ESLint configuration in your project, create a .eslintrc.js file in the root of your project and extend the shared configuration:

module.exports = {
  extends: "@durumim/eslint-config/react"
};

Explanation of Dependencies

  • @typescript-eslint/eslint-plugin: Provides TypeScript-specific linting rules.
  • @typescript-eslint/parser: Parses TypeScript code for ESLint.
  • eslint: The core ESLint library.
  • eslint-config-prettier: Disables ESLint rules that might conflict with Prettier.
  • eslint-plugin-import: Lints ES6 import/export syntax to prevent issues.
  • eslint-plugin-jsx-a11y: Lints accessibility rules for JSX elements.
  • eslint-plugin-react: Provides React-specific linting rules.
  • eslint-plugin-react-hooks: Enforces rules of hooks for React.
  • prettier: Code formatter to ensure consistent code style.
  • eslint-plugin-simple-import-sort: Sorts import statements for better readability.
  • eslint-plugin-unused-imports: Removes unused import statements.
  • eslint-config-standard: JavaScript Standard Style configuration.

Detailed Configuration

The provided ESLint configuration includes:

extends

  • eslint:recommended: Recommended rules from ESLint.
  • standard: Standard JavaScript Style Guide rules.
  • plugin:import/warnings: Rules for handling ES6 imports.
  • plugin:react/recommended: Recommended rules for React.
  • plugin:prettier/recommended: Integration between Prettier and ESLint.
  • plugin:react-hooks/recommended: Recommended rules for React Hooks.
  • plugin:@typescript-eslint/recommended: Recommended rules for TypeScript.

env

  • es2024: Enables ECMAScript 2024 environment.
  • jest: Enables Jest global variables.
  • browser: Enables browser global variables.

parserOptions

  • ecmaVersion: Sets the latest ECMAScript version.
  • sourceType: Enables ECMAScript modules.
  • ecmaFeatures: Enables JSX support.

parser

  • @typescript-eslint/parser: Sets TypeScript parser.

plugins

  • react: Plugin for React.
  • react-hooks: Plugin for React Hooks.
  • @typescript-eslint: Plugin for TypeScript.
  • simple-import-sort: Plugin for sorting imports.
  • import: Plugin for handling ES6 imports.
  • unused-imports: Plugin for detecting and removing unused imports.
  • prettier: Plugin for integrating Prettier with ESLint.
  • jsx-a11y: Plugin for improving JSX accessibility.

globals

  • React: Defines React as a global variable.
  • JSX: Defines JSX as a global variable.

settings

  • react.version: Automatically detects the React version.
  • import/parsers: Sets the parser for TypeScript files.

ignorePatterns

  • .*.js: Ignores hidden JavaScript files.
  • node_modules/: Ignores the node_modules folder.
  • dist/: Ignores the dist folder.

rules

  • unused-imports/no-unused-imports: Warns about unused imports.
  • unused-imports/no-unused-vars: Warns about unused variables and arguments.
  • simple-import-sort/exports: Sorts exports.
  • import/first: Ensures imports come first.
  • import/newline-after-import: Ensures a newline after imports.
  • import/no-duplicates: Prevents duplicate imports.
  • import/no-named-as-default: Disables the no-named-as-default rule.
  • react/react-in-jsx-scope: Disables the react-in-jsx-scope rule.
  • react/prop-types: Disables the requirement for prop-types in React components.
  • prettier/prettier: Enforces Prettier formatting rules.
  • jsx-a11y/alt-text: Enforces accessibility rules for elements.
  • jsx-a11y/aria-props: Warns about invalid ARIA properties.
  • jsx-a11y/aria-proptypes: Warns about invalid ARIA property types.
  • jsx-a11y/aria-unsupported-elements: Warns about elements that do not support ARIA.
  • jsx-a11y/role-has-required-aria-props: Warns about roles missing required ARIA properties.
  • jsx-a11y/role-supports-aria-props: Warns about unsupported ARIA properties for roles.
  • react/no-unknown-property: Prevents using unknown properties in React components.
  • @typescript-eslint/no-namespace: Disables the no-namespace rule for TypeScript.
  • simple-import-sort/imports: Sorts imports into groups for better readability.

Contributing

Feel free to open an issue or submit a pull request if you have any suggestions or improvements.

License

This project is licensed under the MIT License.