1.0.8 • Published 1 year ago

eslint-plugin-iot-cardboard-js v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

npm npm-tag

Why use this package?

This package is really only intended to be used by the @microsoft/iot-cardboard-js project to enforce the custom styling rules for that project.

To install

npm install --save-dev @microsoft/eslint-plugin-cardboard-iot-js

// or

yarn add -D @microsoft/eslint-plugin-cardboard-iot-js

Then update your eslint with the plugin import and add the recommended rule set

module.exports = {
    env: {
        es6: true,
    },
    extends: ["plugin:iot-cardboard-js/recommended"],
    parser: "@typescript-eslint/parser",
    parserOptions: {
        project: ["./tsconfig.json"],
        sourceType: "module",
        ecmaVersion: "es2019",
    },
    plugins: ["iot-cardboard-js"],
};

Rule Details

Rule: debug-logging-disabled

This rule checks that any constant named with the value debugLogging has a value of false

This PASSES - all properties are decorated correctly

const debugLogging = false;

This FAILS - because the value is true

const debugLogging = true;