Socket
Book a DemoInstallSign in
Socket

@spokedev/eslint-config-jigsaw

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spokedev/eslint-config-jigsaw

ESLint rules for Jigsaw.

0.1.22-rc1
latest
npmnpm
Version published
Maintainers
2
Created
Source

Linting

Contains the linting rules for Jigsaw.

Please install the following extensions if using VS Code:

  • Code Spell Checker - Catch spelling mistakes.
  • Cucumber (Gherkin) - Syntax highlighting for Cucumber/Gherkin files.
  • DotENV - Syntax highlighting for .env files.
  • EditorConfig - Use the same editor settings as everybody else.
  • ESLint - Linter plugin required for this module.
  • GitLens - See who committed each line of code.
  • Markdown Preview Mermaid - Renders Mermaid graphs in Markdown preview.
  • Swagger Viewer - Preview Swagger files.
  • TODO Highlight - Highlight // TODO: ... comments in code.
  • vscode-icons - Make the directory tree viewer easier to read.
  • Whitespacer - Utility for converting tabs to spaces and back.
  • YAML - Syntax highlighting for .yaml|.yml files.

Quick Start

To use this linting package in your projects you must include the peerDependencies listed in the ./package.json as devDependencies in your project, and create a .eslintrc.js file the root directory of your project.

1. Add all the peerDependencies as devDependencies in your project:

{
  "name": "my-project",
  "devDependencies": {
    "@jigsaw/eslint-config-jigsaw": "-version-",
    "babel-eslint": "-version-",
    "eslint": "-version-",
    ... // See package.json for the full list of other dependencies required.
  }
}

2. Make sure you include an engines.node property in your package.json containing the minimum supported Node.js version, e.g. ">12":

{
  "name": "my-project",
  "devDependencies": {...},
  "engines": {
    "node": ">12"
  }
}

3. Create an .eslintrc.js file in the root directory of your project like one of the following:

Using the backend rules

module.exports = {
  "extends": "@spokedev/eslint-config-jigsaw/backend",
};

Using the frontend rules

module.exports = {
  "extends": "@spokedev/eslint-config-jigsaw/frontend",
};

Using the base rules

module.exports = {
  "extends": "@spokedev/eslint-config-jigsaw",
};

Making Changes

The frontend rules are contained in ./frontend.js and the backend rules in ./backend.js. You probably want to edit either of those files. The base rules are shared between both the frontend and backend and can be found in ./base.js.

  • Modify the rules you need.
  • If using a new plugin, make sure you add it as a peerDependency in ./package.json.
  • Increment the package version with npm version [patch|minor|major].
  • Git commit and push.
  • Publish to npm with npm publish.
  • Update projects with the new npm package version and run npm update.

FAQs

Package last updated on 23 Aug 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.