How to use the eslint-plugin-mozilla/lib/configs/xpcshell-test.js.rules function in eslint-plugin-mozilla

To help you get started, we’ve selected a few eslint-plugin-mozilla examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / releases-comm-central / .eslintrc.js View on Github external
files: "**/*.*html",
      rules: {
        "eol-last": "off",
      },
    },
    {
      files: "**/.eslintrc.js",
      env: {
        node: true,
      },
    },
    {
      ...removeOverrides(xpcshellTestConfig),
      files: xpcshellTestPaths.map(path => `${path}**`),
      rules: {
        ...xpcshellTestConfig.rules,
        "func-names": "off",
      },
    },
    {
      // If it is a test head file, we turn off global unused variable checks, as it
      // would require searching the other test files to know if they are used or not.
      // This would be expensive and slow, and it isn't worth it for head files.
      // We could get developers to declare as exported, but that doesn't seem worth it.
      files: [
        ...browserTestPaths.map(path => `${path}head*.js`),
        ...xpcshellTestPaths.map(path => `${path}head*.js`),
      ],
      rules: {
        "no-unused-vars": [
          "error",
          {

eslint-plugin-mozilla

A collection of rules that help enforce JavaScript coding standard in the Mozilla project.

MPL-2.0
Latest version published 10 days ago

Package Health Score

63 / 100
Full package analysis