New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More β†’
Socket
Sign inDemoInstall
Socket

eslint-plugin-crisp

Package Overview
Dependencies
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-crisp

Custom ESLint Rules for Crisp

  • 1.0.68
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-80.3%
Maintainers
2
Weekly downloads
Β 
Created
Source

ESLint Plugin Crisp

Build and Release NPM Downloads

A set of custom ESLint configurations and rules for Crisp.

😘 Maintainers: @baptistejamin, @eliottvincent

Usage

The plugin provides two configurations:

  • crisp/recommended: JS rules targetting backend code (Node.js)
  • crisp/recommended-vue: JS rules targetting frontend code (Vue.js)

Add the plugin in your ESLint config object, then extend the desired configuration:

{
  "plugins": [
    "eslint-plugin-crisp"
  ],

  "extends": [
    "plugin:crisp/recommended"
    // OR "plugin:crisp/recommended-vue"
  ]
}

Documentation

This is the list of plugins and rules used by ESLint Plugin Crisp, and what they do.

Each item has emojis denoting:

  • βšͺ️: enabled in plugin:crisp/recommended
  • 🟒: enabled in plugin:crisp/recommended-vue

Configurations

Plugins

Rules

General JS rules
  • arrow-parens (βšͺ️🟒): Requires parentheses around arrow function arguments
  • brace-style (βšͺ️🟒): Enforces one true brace style for blocks
  • comma-dangle (βšͺ️🟒): Disallows trailing commas
  • comma-style (βšͺ️🟒): Requires a comma after and on the same line
  • curly (βšͺ️🟒): Ensures block statements are always wrapped in curly braces
  • computed-property-spacing (🟒): Disallows spaces inside computed property brackets
  • default-param-last (βšͺ️🟒): Enforces default parameters to be last
  • default-case-last (βšͺ️🟒): Enforces default clauses in switch statements to be last
  • dot-notation (βšͺ️🟒): Enforces dot notation instead of square-bracket notation
  • eqeqeq (βšͺ️🟒): Requires the use of === and !==
  • eol-last (βšͺ️🟒): Requires newline at the end of files
  • indent (βšͺ️🟒): Enforces 2-space indentation, and specific indentation levels for some nodes
  • for-direction (βšͺ️🟒): Prevents for-loops to have stop condition that can never be reached
  • key-spacing (🟒): Enforces consistent spacing in object literal properties (no space between the key and the colon, one space between the colon and the value)
  • linebreak-style (βšͺ️🟒): Enforces Unix-style line endings
  • max-len (βšͺ️): Enforces a maximum line length of 80 characters
  • newline-per-chained-call (🟒): Requires a newline after each call in a method chain
  • no-console (βšͺ️🟒): Disallows the use of console
  • no-debugger (βšͺ️🟒): Disallows the use of debugger
  • no-eval (βšͺ️🟒): Disallows the use of eval
  • no-magic-numbers (βšͺ️): Disallows magic numbers (except the ones in the context of array indexes and in default value assignments)
  • no-multi-str (βšͺ️🟒): Disallows multiline strings
  • no-multiple-empty-lines (🟒): Allows a maximum of 1 consecutive empty lines
  • no-mixed-spaces-and-tabs (βšͺ️🟒): Disallows mixed spaces and tabs for indentation
  • no-restricted-syntax (🟒): Enforces switch case's content to be enclosed in braces
  • no-tabs (βšͺ️🟒): Disallows tabs
  • no-trailing-spaces (βšͺ️🟒): Disallows trailing whitespace at the end of lines
  • no-unused-vars (βšͺ️🟒): Disallows unused variables
  • no-unsafe-optional-chaining (βšͺ️🟒): Disallows use of optional chaining in contexts where the undefined value is not allowed
  • object-curly-newline (βšͺ️🟒): Requires line breaks after opening and before closing braces
  • object-curly-spacing (βšͺ️🟒): Requires spacing inside of braces
  • padded-blocks (βšͺ️🟒): Disallows empty lines at the beginning and ending of blocks
  • padding-line-between-statements (βšͺ️🟒): Requires padding lines between various statements
  • prefer-arrow-callback (🟒): Requires using arrow functions for callbacks
  • quotes (βšͺ️🟒): Enforces the consistent use of double quotes (while allowing single quotes in order to avoid escape, and backticks for template literals)
  • quote-props (βšͺ️🟒): Disallows quotes around object literal property names that are not strictly required
  • semi (βšͺ️🟒): Requires semicolons at the end of statements
  • semi-style (βšͺ️🟒): Enforces that semicolons are at the end of statements
  • semi-spacing (🟒): Disallows space before semicolons, enforces spaces after
  • space-before-blocks (βšͺ️🟒): Enforces consistent spacing before blocks
  • space-in-parens (βšͺ️🟒): Enforces zero spaces inside of parentheses
Crisp JS rules
General JSDoc rules
Crisp JSDoc rules
General Vue rules
Crisp Vue rules

License

eslint-plugin-crisp is released under the MIT License. See the bundled LICENSE file for details.

Keywords

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc