Socket
Socket
Sign inDemoInstall

@walgreenshealth/test-eslint-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walgreenshealth/test-eslint-plugin

This plugin is mostly a set of configurations for ESLint. It consolidates a bunch of open source plugins and has _a lot_ of rules.


Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

@walgreenshealth/eslint-plugin

This plugin is mostly a set of configurations for ESLint. It consolidates a bunch of open source plugins and has a lot of rules.

It includes the following configs:

  • walgreenshealth/recommended
  • @walgreenshealth/typescript
  • @walgreenshealth/storybook
  • @walgreenshealth/jest

And the following custom rules:

  • @walgreenshealth/custom-element-name makes sure name of a custom element declared in @customElement(walgreenshealth-whatever) matches its file name
  • @walgreenshealth/element-export-name makes sure the element's class name matches the file name

Here's a simple example of how to use it (.eslint.config.json):


{
  "plugins": ["@walgreenshealth/eslint-plugin"],
  "extends": ["plugin:@walgreenshealth/recommended"],
  "overrides": [
    {
      files: ["*.stories.js"],

      extends: [
        "plugin:@walgreenshealth/recommended",
        "plugin:@walgreenshealth/storybook",
      ],
    },
    {
      files: ["*.test.js"],

      extends: [
        "plugin:@walgreenshealth/recommended",
        "plugin:@walgreenshealth/storybook",
      ],
    }
};

/* eslint sonarjs/no-duplicate-string: "off" */
"use strict";

const typescriptParserOptions = {
  project: "tsconfig.eslint.json",
  tsconfigRootDir: __dirname,
};

module.exports = {
  parserOptions: {
    ecmaVersion: 2022,
    sourceType: "module",
  },

  extends: ["plugin:@walgreenshealth/recommended"],

  ignorePatterns: [
    "**/node_modules/**",
    "**/*.min.js",
    "**/dist/**",
    "**/coverage/**",
    "**/reports/**",
    "**/.stryker-tmp/**",
    "**/_templates/**",
    "stryker.conf.json",
  ],

  overrides: [
    {
      files: ["*.ts"],

      extends: [
        "plugin:@walgreenshealth/recommended",
        "plugin:@walgreenshealth/typescript",
      ],

      parserOptions: typescriptParserOptions,
    },

    {
      files: ["**/*.stories.ts"],

      extends: [
        "plugin:@walgreenshealth/recommended",
        "plugin:@walgreenshealth/typescript",
        "plugin:@walgreenshealth/storybook",
      ],

      parserOptions: typescriptParserOptions,
    },

    {
      files: ["**/*.test.ts"],

      extends: [
        "plugin:@walgreenshealth/recommended",
        "plugin:@walgreenshealth/typescript",
        "plugin:@walgreenshealth/jest",
      ],

      parserOptions: typescriptParserOptions,
    },
    {
      files: ["**/*.cjs"],

      parserOptions: {
        sourceType: "script",
      },

      env: {
        node: true,
      },

      extends: ["plugin:@walgreenshealth/recommended"],

      rules: {
        "import/no-commonjs": "off",

        "import/no-extraneous-dependencies": [
          "error",
          { devDependencies: true },
        ],
      },
    },
    {
      files: ["scripts/*.mjs"],

      parserOptions: {
        sourceType: "module",
      },

      env: {
        node: true,
      },

      extends: ["plugin:@walgreenshealth/recommended"],

      rules: {
        "no-console": "off",

        "import/no-extraneous-dependencies": [
          "error",
          { devDependencies: true },
        ],
      },
    },
  ],

  plugins: ["@walgreenshealth/eslint-plugin"],
};

FAQs

Package last updated on 09 Sep 2022

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