facebook pixelJavaScript Static Analysis Rules
BACK TO LIST

JavaScript rules

The Codiga Static Analysis engine checks JavaScript code and supports many popular libraries. If you are using React, NextJS, Vue or Angular: the engine will flag any issue in your codebase. Automate your code reviews with Codiga and merge with confidence.

      cypress/no-unnecessary-waiting

      Best practice
      Minor

      Unnecessary wait for cy.request()

      Learn more

      import/extensions

      Best practice
      Minor

      Ensure consistent use of file extension within the import path

      import/no-commonjs

      Best practice
      Minor

      Reports require([string]) function calls. Will not report if >1 argument, or single argument is not a literal string.

      import/no-dynamic-require

      Best practice
      Minor

      Checks every call to require() that uses expressions for the module name argument.

      import/no-unresolved

      Best practice
      Minor

      Ensures an imported module can be resolved to a module on the local filesystem, as defined by standard Node require.resolve behavior.

      import/no-unused-modules

      Best practice
      Minor

      Reports modules without any exports, individual exports not being statically imported or required from other modules in the same project or dynamic imports are supported if argument is a literal string

      import/no-webpack-loader-syntax

      Best practice
      Minor

      Forbid Webpack loader syntax in imports.

      import/order

      Best practice
      Minor

      Enforce a convention in the order of require() / import statements.

      jsx-a11y/anchor-is-valid

      Best practice
      Minor

      Make sure the HTML <a> has a valid href value and can be used to navigate in a browser, make sure all attributes are specified correctly.

      jsx-a11y/label-has-for

      Best practice
      Minor

      Accessibility: Enforce that a label tag has a text label and an associated control.

      mocha/no-hooks-for-single-case

      Best practice
      Minor

      Disallow hooks for a single test or test suite

      mocha/no-setup-in-describe

      Best practice
      Minor

      Disallow setup in describe blocks

      unicorn/prevent-abbreviations

      Best practice
      Minor

      Using complete words results in more readable code. Not everyone knows all your abbreviations.