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

eslint-config-strict-mode

v1.2.1

Published

ESLint configuration for linting TS, JS, JSON, YAML, and TOML

Downloads

166

Readme

ESLint configuration for linting TS, JS, JSON, YAML, and TOML

Table of Contents

Overview

This ESLint configuration package includes basically every quality ESLint plugin available. The default settings are meant to enforce strict design patterns among developers who code with TypeScript and JavaScript. It also includes linting rules for JSON, YAML, and TOML. Most of the rules include auto-fix functionality and it even sorts JSON and YAML. You can use this configuration as is or customize it to your liking so you can have your own shared ESLint configuration package!

Requirements

If you are simply including this library in your project, all you need is a recent version of Node.js. Node.js >14.18.0 is sometimes required and is the only version range we actively support. Albeit, it is highly probable that lower versions will work as well depending on the requirements that this project imports.

Developer Requirements

The following versions of Node.js and Python are required for development:

Other versions may work, but only the above versions are supported. Most development dependencies are installed automatically by our Taskfile.yml set-up (even Node.js and Python). Run bash start.sh to install Bodega (an improved fork of go-task) and run the initialization sequence. The taskfiles will automatically install dependencies as they are needed, based on what development tasks you are running. For more information, check out the CONTRIBUTING.md or simply run:

npm run help

npm run help will ensure Bodega is installed and then open an interactive dialog where you can explore and learn about various developer commands.

Usage

To make use of this configuration, you need to first install the configuration in your Node.js project:

npm install --save-dev eslint-config-strict-mode

After that, you need to include a reference to the package in your package.json:

{
  "name": "mynpmpackage",
  "version": "0.0.1",
  ...
  "eslintConfig": {
    "extends": "eslint-config-strict-mode"
  }
}

You can override the settings that are provided by the plugin by including additional rules in your package.json. For instance, if you wanted to turn off a rule named max-len, your package.json would look something like this:

{
  "name": "mynpmpackage",
  "version": "0.0.1",
  ...
  "eslintConfig": {
    "extends": "eslint-config-strict-mode",
    "rules": {
        "max-len": "off"
    }
  }
}

Plugins

The following ESLint plugins are included in this configuration:

| ESLint Plugin | Description | | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | @typescript-eslint/eslint-plugin | An ESLint plugin which provides lint rules for TypeScript codebases | | @typescript-eslint/eslint-plugin-tslint | ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint | | @typescript-eslint/parser | An ESLint parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code | | eslint-config-prettier | Turns off all rules that are unnecessary or might conflict with Prettier | | eslint-formatter-git-log | Formatter that displays results that include the name of the developer who is responsible for the error | | eslint-formatter-gitlab | Formatter for GitLab CI that integrates results into merge requests | | eslint-formatter-pretty | Stylish formatter for terminal results that includes features such as clicking result to open code in editor | | eslint-formatter-summary | Alternate formatting style for the results that displays a table | | eslint-plugin-angular | Rules for Angular applications | | eslint-plugin-array-func | Rules for Array functions and methods | | eslint-plugin-editorconfig | An ESLint plugin to enforce EditorConfig rules | | eslint-plugin-eslint-comments | Additional ESLint rules for ESLint directive comments | | eslint-plugin-etc | More generalcpurpose TypeScript-related ESLint rules | | eslint-plugin-ext | eslint extended rules | | eslint-plugin-filenames | ESLint plugin to check filenames | | eslint-plugin-fp | ESLint rules for functional programming | | eslint-plugin-functional | ESLint plugin to disable mutation and promote functional programming in JavaScript and TypeScript | | eslint-plugin-import | ESLint plugin with rules that help validate proper imports | | eslint-plugin-jest | ESLint plugin for Jest | | eslint-plugin-jest-async | ESLint rules for Jest to detect improper test assertions for asynchronous actions | | eslint-plugin-jest-dom | Lint DOM API performance | | eslint-plugin-jest-formatting | Linting rules for ESLint realted to code style formatting | | eslint-plugin-jsdoc | Rules that enforce comments written in JSDoc syntax | | eslint-plugin-json-schema-validator | ESLint plugin that validates data using JSON Schema Validator | | eslint-plugin-jsonc | ESLint plugin for JSON, JSONC and JSON5 files | | eslint-plugin-no-constructor-bind | Prefer class arrow functions to binding in the constructor | | eslint-plugin-no-explicit-type-exports | A plugin to guard against exporting imported types | | eslint-plugin-no-secrets | An ESLint plugin to find strings that might be secrets or credentials | | eslint-plugin-no-unsanitized | Custom ESLint rule to disallows unsafe innerHTML, outerHTML, insertAdjacentHTML and alike | | eslint-plugin-no-use-extend-native | ESLint plugin to prevent use of extended native objects | | eslint-plugin-node | Additional ESLint's rules for Node.js | | eslint-plugin-optimize-regex | Optimize regex literals | | eslint-plugin-prefer-arrow | ESLint plugin to prefer arrow functions | | eslint-plugin-prettier | ESLint plugin to prefer arrow functions | | eslint-plugin-promise | Enforce best practices for JavaScript promises | | eslint-plugin-regexp | ESLint plugin for finding RegExp mistakes and RegExp style guide violations | | eslint-plugin-rxjs | ESLint rules for RxJS | | eslint-plugin-security | ESLint rules for Node Security | | eslint-plugin-sonarjs | SonarJS rules for ESLint | | eslint-plugin-sort-class-members | ESLint rule for enforcing consistent ES6 class member order | | eslint-plugin-sort-keys-fix | Fork of eslint rule that sorts keys in objects with autofix enabled | | eslint-plugin-switch-case | Switch-case-specific linting rules for ESLint | | eslint-plugin-toml | ESLint plugin provides linting rules for TOML | | eslint-plugin-tsdoc | This ESLint plugin provides a rule for validating that TypeScript doc comments conform to the TSDoc specification | | eslint-plugin-typescript-sort-keys | A linter plugin to require sorting interface and string enum keys | | eslint-plugin-unicorn | Various awesome ESLint rules | | eslint-plugin-unused-imports | Package to seperate no-unused-vars and no-unused-imports for ESLint as well as providing an autofixer for the latter | | eslint-plugin-woke | ESLint plugin to promote diversity and inclusion in codebases by restricting the presence of certain potentially offensive keywords | | eslint-plugin-yml | ESLint plugin provides linting rules for YAML |

Most of the items in the chart above are plugins used for extending the core functionality of ESLint. These all start off with eslint-plugin-. However, there are a few items that begin with eslint-formatter-. These allow you to change the format that ESLint reports with. You can, for instance, run the following to change the format of the results:

eslint --format pretty --fix .

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.

Brian Zalewski

Affiliates

Below you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:

License

Copyright © 2020-2021 Megabyte LLC. This project is MIT licensed.