Using ESLint

While DeepScan is focusing on the capability beyond lint, many users still want to use ESLint for checking code styles and by its useful plugins.

Now you can analyze your projects with both DeepScan and ESLint and see the results altogether from our dashboard.

ESLint Analysis

DeepScan provides ESLint analysis to help organizations using ESLint manage the results of both tools. After DeepScan has finished its own analysis, it runs ESLint v5.16 and aggregates the result by both tools.

Although the ESLint analysis fails by any reasons, you can see the analysis results of DeepScan without an interruption.

Enable ESLint Analysis

By default, ESLint analysis is disabled. To enable it, do the following:

  • Navigate to the project settings
  • Check on the Enable ESLint option
  • When you are asked whether or to reanalyze, click Reanalyze button
ESLint settings

Merge Options

DeepScan and ESLint rules can be duplicated such as BAD_TYPEOF_COMPARISON and valid-type-of, so the option to merge these issues is provided.

In the project settings, you can choose how the identical issues are merged:

  • Prefer DeepScan rule: Show only DeepScan issue (E.g., BAD_TYPEOF_COMPARISON)
  • Prefer ESLint rule: Show only ESLint issue (E.g., valid-type-of)
  • Do not merge: Show all issues as is (E.g., BAD_TYPEOF_COMPARISON and valid-type-of)

View Issues

In the Issues view, you can see the issues detected by both tools.

If you want to view only the ESLint issues, check ESLint checkbox solely in the left engines filter. Also, you can navigate to the document page by clicking a rule name.

ESLint Issues

Supported Plugins

DeepScan runs ESLint within a Docker container. For security concerns due to executing code, only a predefined set of ESLint plugins are supported:

babel-eslint
eslint-config-airbnb
eslint-config-airbnb-base
eslint-config-angular
eslint-config-ember
eslint-config-google
eslint-config-loopback
eslint-config-prettier
eslint-config-standard-jsx
eslint-config-standard-react
eslint-config-xo-react
eslint-config-xo-space
eslint-import-resolver-node
eslint-import-resolver-webpack
eslint-plugin-eggache
eslint-plugin-ember
eslint-plugin-flowtype
eslint-plugin-import
eslint-plugin-jasmine
eslint-plugin-jest
eslint-plugin-jsdoc
eslint-plugin-lodash
eslint-plugin-markdown
eslint-plugin-mocha
eslint-plugin-no-only-tests
eslint-plugin-no-unsafe-innerhtml
eslint-plugin-node
eslint-plugin-prettier
eslint-config-react-app
eslint-plugin-react
eslint-plugin-react-native
eslint-plugin-security
eslint-plugin-vue
eslint-plugin-jsx-a11y
eslint-plugin-react-hooks
eslint-plugin-redux-saga
eslint-plugin-react-with-styles

If you want additional plugins, contact us at support@deepscan.io.

DeepScan does not run npm install on the project and ESLint is run without node_modules. This may generate false alarms about importing modules. To prevent these false alarms we ignore the following rules:

import/extensions
import/no-restricted-paths
import/no-unresolved
import/no-extraneous-dependencies
import/no-named-as-default
import/namespace
import/named
import/no-absolute-path
import/no-duplicates
import/no-named-as-default-member
import/no-cycle
node/no-hide-code-modules
node/no-missing-require
node/no-missing-import