This package has been deprecated

    Author message:

    This package is now a private implementation detail of https://github.com/Azure/azure-sdk-for-js

    @azure/eslint-plugin-azure-sdk

    2.0.1 • Public • Published

    eslint-plugin-azure-sdk

    An ESLint plugin enforcing design guidelines for the JavaScript/TypeScript Azure SDK.

    Installation

    You'll first need to install ESLint:

    npm i eslint --save-dev

    Next, install @azure/eslint-plugin-azure-sdk:

    npm install @azure/eslint-plugin-azure-sdk --save-dev

    Usage

    Add @azure/azure-sdk to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

    {
      "plugins": ["@azure/azure-sdk"]
    }

    Make sure to set your .eslintrc configuration file's parserOptions.project field to point to the tsconfig file at the root of your project as follows:

    {
      "parserOptions": {
        "project": "./tsconfig.json"
      }
    }

    For all rules to be enforced according to the standards set by the Design Guidelines, add this plugin's recommended configuration to the extends section of your .eslintrc configuration file as follows:

    {
      "extends": ["plugin:@azure/azure-sdk/recommended"]
    }

    If the main TypeScript entrypoint to your package is not in src/index.ts, set settings.main in your .eslintrc configuration file to the entrypoint as follows (for example, if the entrypoint is index.ts):

    {
      "settings": {
        "main": "index.ts"
      }
    }

    If you need to modify or disable specific rules, you can do so in the rules section of your .eslintrc configuration file. For example, if you are not targeting Node, disable ts-config-moduleresolution as follows:

    {
      "rules": {
        "@azure/azure-sdk/ts-config-moduleresolution": "off"
      }
    }

    Some rules (see table below) are fixable using the --fix ESLint option (added in 1.3.0).

    Supported Rules

    Key

    Symbol Meaning
    🚩 Error
    ⚠️ Warning
    ✖️ Off
    ✔️ Fixable and autofix-enabled
    Not fixable

    Rules

    Rule Default Fixable Release
    github-source-headers 🚩 ✔️ 1.1.0
    ts-apisurface-standardized-verbs 🚩 1.2.0
    ts-apisurface-supportcancellation 🚩 1.2.0
    ts-config-allowsyntheticdefaultimports 🚩 ✔️ 1.0.0
    ts-config-declaration 🚩 ✔️ 1.0.0
    ts-config-esmoduleinterop 🚩 ✔️ 1.0.0
    ts-config-exclude 🚩 ✔️ 1.0.0
    ts-config-forceconsistentcasinginfilenames 🚩 ✔️ 1.0.0
    ts-config-importhelpers 🚩 ✔️ 1.0.0
    ts-config-lib 🚩 ✔️ 1.0.0
    ts-config-module 🚩 ✔️ 1.0.0
    ts-config-moduleresolution 🚩 ✔️ 1.1.0
    ts-config-no-experimentaldecorators 🚩 ✔️ 1.0.0
    ts-config-sourcemap 🚩 ✔️ 1.0.0
    ts-config-strict 🚩 ✔️ 1.0.0
    ts-config-target 🚩 1.1.0
    ts-doc-internal 🚩 1.1.0
    ts-error-handling ✖️ 1.1.0
    ts-modules-only-named 🚩 1.1.0
    ts-naming-drop-noun 🚩 1.2.0
    ts-naming-options 🚩 1.2.0
    ts-naming-subclients 🚩 1.2.0
    ts-no-const-enums ⚠️ ✔️ 1.1.0
    ts-no-namespaces 🚩 1.2.0
    ts-package-json-author 🚩 ✔️ 1.0.0
    ts-package-json-bugs 🚩 ✔️ 1.0.0
    ts-package-json-engine-is-present 🚩 ✔️ 1.1.0
    ts-package-json-files-required 🚩 ✔️ 1.1.0
    ts-package-json-homepage 🚩 1.0.0
    ts-package-json-keywords 🚩 ✔️ 1.0.0
    ts-package-json-license 🚩 ✔️ 1.0.0
    ts-package-json-main-is-cjs 🚩 ✔️ 1.1.0
    ts-package-json-module 🚩 ✔️ 1.1.0
    ts-package-json-name 🚩 1.0.0
    ts-package-json-repo 🚩 ✔️ 1.0.0
    ts-package-json-required-scripts 🚩 1.0.0
    ts-package-json-sideeffects 🚩 ✔️ 1.0.0
    ts-package-json-types 🚩 1.1.0
    ts-pagination-list 🚩 1.2.0
    ts-use-interface-parameters ⚠️ 1.1.0
    ts-use-promises 🚩 1.1.0
    ts-versioning-semver 🚩 1.1.0

    Install

    npm i @azure/eslint-plugin-azure-sdk

    DownloadsWeekly Downloads

    1,606

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    89.2 kB

    Total Files

    53

    Last publish

    Collaborators

    • azure-sdk