Giter Club home page Giter Club logo

codeclimate-eslint's Introduction

Code Climate ESLint Engine

Code Climate

codeclimate-eslint is a Code Climate engine that wraps ESLint. You can run it on your command line using the Code Climate CLI, or on our hosted analysis platform.

ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. It can be configured using a configuration file.

Channels

There are a few major versions of ESLint out there. The latest major version is 4. This engine provides a few channels for major versions of ESLint.

This branch is for the latest (i.e. default) channel and provides ESLint 3 support.

For ESLint 4, please see channel/eslint-4 branch.

Installation

  1. If you haven't already, install the Code Climate CLI

  2. Run codeclimate engines:enable eslint. This command both installs the engine and enables it in your .codeclimate.yml file

  3. You're ready to analyze! Browse into your project's folder and run codeclimate analyze

Configuration

ignore_warnings

By default, this engine will emit both ESLint errors and warnings as Code Climate issues. If you prefer, you can ignore warning-level violations by setting the ignore_warnings configuration option:

eslint:
  enabled: true
  config:
    ignore_warnings: true

extensions

If you're using a plugin like eslint-plugin-json or eslint-plugin-html, you will want to set this value to make sure the appropriate files are included:

eslint:
  enabled: true
  config:
    extensions:
    - .js
    - .html

sanitize_batch

By default, this engine will skip files that appear to be minified (average line length over 100). This feature can be disabled to include all files for analysis.

eslint:
  enabled: true
  config:
    sanitize_batch: false

Need help?

For help with ESLint, check out their documentation.

If you're running into a Code Climate issue, first look over this project's GitHub Issues, as your question may have already been covered. If not, go ahead and open a support ticket with us.

codeclimate-eslint's People

Contributors

afestein avatar brynary avatar dantevvp avatar dblandin avatar dependabot[bot] avatar efueger avatar fhwang avatar filipesperandio avatar garthdb avatar gdiggs avatar greenkeeper[bot] avatar jpignata avatar kculafic avatar kevinansfield avatar larkinscott avatar leftees avatar martinpotel avatar maxjacobson avatar noahd1 avatar oleksiyk avatar pbrisbin avatar pointlessone avatar pvdlg avatar pyvesb avatar rmg avatar ryanau avatar troyastorino avatar wagenet avatar wfleming avatar wilson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeclimate-eslint's Issues

EngineFailure with status 137 and no stderr

Hi guys,

I got this error using the CLI :

error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 137 and stderr ""

It does not tell me that much but here is my .eslintrc :

{
  "globals": {
    "rewire" : true,
    "rewireModule" : true
  },
  "parser": "esprima-fb",
  "ecmaFeatures": {
    "jsx": true
  },
  "env": {
    "jasmine": true,
    "browser": true
  }
}

In this specific project, I have a second issue. I removed it from the config file above but I also use the eslint react plugin (https://github.com/yannickcr/eslint-plugin-react) and I get this error in that case :

error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 1 and stderr "module.js:338\n    throw err;\n          ^\nError: Cannot find module 'eslint-plugin-react'

Hope that helps and if not let me know and I´ll give you more input.

Upgrade eslint version

Latest version is 0.24.1. These new rules have been added since 0.22.1:

  • no-unexpected-multiline
  • constructor-super
  • no-this-before-super
  • array-bracket-spacing
  • computed-property-spacing
  • prefer-const
  • spaced-comment

error: (CC::Analyzer::Engine::EngineFailure) engine eslint:eslint-2 failed with status 139 and stderr

I get this error after running the following:

codeclimate analyze
Starting analysis
Running eslint: Done!
error: (CC::Analyzer::Engine::EngineFailure) engine eslint:eslint-2 failed with status 139 and stderr

I noticed some similar issues brought up in the past about a year ago. A difference with this error is that I can get it to run successfully when I take away channel: "eslint-2 out of the .codeclimate.yml. However, then some ESLint rules do not work.

This analysis is being run on a decently large codebase. Any ideas on how I can proceed?

eslint config file path is ignored.

Hi.
I specified a eslint config file path within my .codeclimate.yml, but it ignored.
My .codeclimate.yml looks like below:

engines:
  eslint:

    enabled: true

    config:
      config: sites/config/.eslintrc

I think it got worse when a creation of a CLIEngine ( new CLIEngine(options) ) moved to the top of the file by this commit. It seems that the creation must be after the processing of options.
What do you think about it?

Update eslint-config-airbnb to v8.0.0

We install v5.0.0 which comes with eslint-config-airbnb/base. They've since deprecated that for eslint-config-airbnb. Users moving to the new import error because this engine doesn't have it. I believe updating should be safe since v8.0.0 still includes /base and /legacy (both deprecated).

/cc @amercier

Definition for rule 'react/jsx-filename-extension' was not found

I'm getting the following issues on codeclimate.com:

Definition for rule 'react/jsx-filename-extension' was not found

This rule is defined in eslint-plugin-react, which is supported by codeclimate eslint.

Here is my .eslintrc

{
  "extends": "airbnb",
  "rules": {
    "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
    "quotes": [1, "double"]
  },
  "env": {
    "browser": true,
    "node": true,
    "jasmine": true
  },
  "plugins": [
    "react",
    "import",
    "jsx-a11y",
  ],
}

And my .codeclimate.yml

engines:
  duplication:
    enabled: true
    config:
      languages:
      - javascript
  eslint:
    enabled: true
    channel: "eslint-2" # leaving this line out does not make any difference
  fixme:
    enabled: true
ratings:
   paths:
   - "**.js"
   - "**.jsx"
exclude_paths: []

Am I doing something wrong?

Update eslint-config-airbnb

It looks like the package.json file here restricts the eslint-config-airbnb versions after 5.0.0 and before 6.0.0. This configuration is currently on version 9 and will likely soon release version 10. What do you think about updating it here?

EngineFailure EACCESS permission denied (X)Ubuntu 14.04

I'm getting a similar result to issue #1 (engine failure), however I get a bit more robust error message:

error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 1 and stderr "fs.js:761
return binding.readdir(pathModule._makeLong(path));
    Error: EACCES, permission denied '/code'
        at Error (native)
        at Object.fs.readdirSync (fs.js:761:18)
        at traverse (/usr/src/app/node_modules/eslint/lib/util/traverse.js:41:12)    
        at walk (/usr/src/app/node_modules/eslint/lib/util/traverse.js:83:9)    
        at /usr/src/app/node_modules/eslint/lib/util/traverse.js:102:9
        at Array.forEach (native)
        at traverse (/usr/src/app/node_modules/eslint/lib/util/traverse.js:101:11)
        at CLIEngine.executeOnFiles (/usr/src/app/node_modules/eslint/lib/cli-engine.js:323:9)
        at Object.<anonymous> (/usr/src/app/bin/eslint:42:18)
        at Module._compile (module.js:460:26)"

(reformatted for easier reading)

I do not have any directory /code within my project, so I'm assuming this is within the docker container.

Here's my .codeclimate.yml file:

---
engines:
  eslint:
    enabled: true
  csslint:
    enabled: true
  phpcodesniffer:
    enabled: true
ratings:
  paths:
  - "**.php"
  - "**.js"
  - "**.jsx"
  - "**.css"
exclude_paths:
- config/**/*
- spec/**/*
- tests/**/*
- node_modules/**/*
- vendor/**/*
- resources/views/**/*
- features/**/*
- database/**/*
- bootstrap/**/*
- public/**/*
- storage/**/*
- docs/**/*
- .idea/**/*

Unforunately I cannot provide source code for the project as it is a private codebase, but it is more-or-less the structure of a Laravel 5.0 codebase (PHP).

Please let me know if I can help debug this issue further, just wanted to report it because I know this is a young project! Thanks for releasing the engine!

Ability to Load Extensions / Plugins from .eslintrc.yml?

I have an .eslintrc.yml in the root of my project that pulls in a few rules from popular extensions and plugins:


---
plugins:
  - meteor
  - react
  - html
extends:
  - airbnb/base
  - plugin:react/recommended

Say I have this code:

App.propTypes = {
  blockchains: PropTypes.array.isRequired,
  bottomNavIcons: PropTypes.array.isRequired # should have a trailing comma based on airbnb/base plugin
};

Outside of CodeClimate CLI, ESLint will flag an error for not having the trailing comma on the third line (comma-dangle). This is expected behavior based on my setup. However, running codeclimate analyze does not catch the error. How do you load these extensions and plugins into codeclimate cli?

I have the following .codeclimate.yml config in the root of my project:

  eslint:
    enabled: true
    config:
      config: ./.eslintrc.yml

Syntax validation

Hello,

I'm getting this error while running in the .com engine.

Configuration for rule "comma-dangle" is invalid:
	Value "[object Object]" must be an enum value.

My comma-dangle rule:

"comma-dangle": ["warn", {
  "arrays": "always-multiline",
  "objects": "always-multiline",
  "functions": "only-multiline"
}],

Probably a ESLint version issue? I couldn't find which version the engine was running on.
Upgrade time? :)

Error when running analyze

When running codeclimate analyze, I get the following error:

Starting analysis
Running rubocop: Done!
Running coffeelint: Done!
Running eslint: Done!
error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 1 and stderr "module.js:338\n    throw err;\n          ^\nError: Cannot find module 'eslint-plugin-nodeca'\n    at Function.Module._resolveFilename (module.js:3
36:15)\n    at Function.Module._load (module.js:278:25)\n    at Module.require (module.js:365:17)\n    at require (module.js:384:17)\n    at /usr/src/app/node_modules/eslint/lib/cli-engine.js:107:26\n    at Array.forEach (native)\n    at
loadPlugins (/usr/src/app/node_modules/eslint/lib/cli-engine.js:98:21)\n    at processFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:179:5)\n    at /usr/src/app/node_modules/eslint/lib/cli-engine.js:332:26\n    at /usr/src/app/n
ode_modules/eslint/lib/util/traverse.js:61:17\n"

Here's my .codeclimate.yml:

---
engines:
  rubocop:
    enabled: true
  coffeelint:
    enabled: true
  eslint:
    enabled: false
  csslint:
    enabled: true
  fixme:
    enabled: true
  bundler-audit:
    enabled: true
ratings:
  paths:
  - "**.rb"
  - "**.coffee"
  - "**.js"
  - "**.jsx"
  - "**.css"
exclude_paths:
- config/**/*
- db/**/*
- node_modules/**/*
- spec/**/*
- vendor/**/*

Do you have any suggestions on how to fix this?

Support Configuration Cascading and Hierarchy

This is behavior is described in the eslint documentation.

My particular use case is a rails app that has a large amount of vanilla/jQuery JavaScript, that is being migrated to es6/JSX. The two different code styles/syntaxes are isolated from each other in sub directories, and for various reasons we cannot make them separate repos (yet). Configuration cascading works perfectly to define a separate set of rules for each type.

A more common use case however, is altering a small set of rules from the base config for a test suite. For example, eslint config for es6/JSX app test suite is basically the same as for the app, but globals for mocha must be whitelisted (describe, it, etc.), no-unused-expressions turned off for chai assertions, laxer quotes to avoid mixed single and double quotes in test descriptions, etc. Configuration cascading is the answer to this problem, and is truly essential to using eslint effectively IMHO.

Question regarding .eslintrc

Just a quick question for you. Im using the codeclimate hosted service and was wondering if I need to do anything specific in my .codeclimate.yml file to tell it to use my .eslintrc. Right now my .codeclimate.yml looks like below:

engines:
  eslint:
    enabled: true
ratings:
  paths:
  - "**.js"
exclude_paths:
- "node_modules/**"
- "www/**"

When using the eslint cli locally, it is pointing out some issues in the code but when I tested committing to master and reran the codeclimate analysis on the website, there aren't any issues popping up. Am I missing something obvious here?

eslint2 doesn't pick up custom js config file

check example repo: https://github.com/sagiegurari/simple-oracledb
codeclimate yml: https://github.com/sagiegurari/simple-oracledb/blob/master/.codeclimate.yml
.eslintrc.js (not .eslintrc): https://github.com/sagiegurari/simple-oracledb/blob/master/.eslintrc.js

in yml I got:

eslint:
    enabled: true
    channel: "eslint-2"
    config:
      config: .eslintrc.js

but after codeclimate build, i get a warning that some config was auto generated and I see it generated .eslintrc for some reason.

https://codeclimate.com/repos/561f3da769568023050054c3/analysis_config

Doesn't load project plugins

My eslintrc file is trying to use the react plugin which is not loaded by the analyzer engine

error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 1 and stderr "module.js:338\n throw err;\n ^\nError: Cannot find module 'eslint-plugin-react'\n at Function.Module._resolveFilename (module.js:336:15)\n at Function.Module._load (module.js:278:25)\n at Module.require (module.js:365:17)\n at require (module.js:384:17)\n at /usr/src/app/node_modules/eslint/lib/cli-engine.js:107:26\n at Array.forEach (native)\n at loadPlugins (/usr/src/app/node_modules/eslint/lib/cli-engine.js:98:21)\n at processFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:179:5)\n at /usr/src/app/node_modules/eslint/lib/cli-engine.js:332:26\n at /usr/src/app/node_modules/eslint/lib/util/traverse.js:61:17\n"

Can we add support for Standard Style out-of-the-box without config files?

Philosophy of Standard is no configuration - it should be easy and simple to enforce this style and hard to change it.

Can we have a special case where if there's "standard" in dependencies or devDependencies, then the style is enabled automatically? This can easily be determined statically, so I don't see any issues.

It is really annoying to use Standard and then still have to add .codeclimate.yml and .eslintrc config files just to get it working in a standard way.

Support older versions of eslint & plugins moving forward?

The recent updates to eslint-config-airbnb and eslint-plugin-react caused a lot of issues as our team all of the sudden had branches failing that were previously passing.

I'm wondering if there is a way for you to support using older versions of eslint and the supported parsers/plugins moving forward.

It seems like you support older versions of rubocop through the codeclimate.yml config, just wondering if there were plans to extend this to eslint eventually.
#76 is related, as this will break compatibility with a lot of rules (afaik).

[eslint-2] Cannot find module estraverse-fb

Error: Cannot find module 'estraverse-fb'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at monkeypatch (/usr/src/app/node_modules/babel-eslint/index.js:59:32)
    at Object.exports.parse (/usr/src/app/node_modules/babel-eslint/index.js:422:5)
    at parse (/usr/src/app/node_modules/eslint/lib/eslint.js:577:27)
    at EventEmitter.module.exports.api.verify (/usr/src/app/node_modules/eslint/lib/eslint.js:715:19)
    at processText (/usr/src/app/node_modules/eslint/lib/cli-engine.js:187:27)
    at processFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:227:18)
    at executeOnFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:603:23)

Lack of eslint-2 plugin and standards support

In the latest update to provide the eslint-2 channel, I noticed that a few packages originally supported with ESLint 1.x are no longer provided in the ESLint 2.x channel:

In 1.x:

    "eslint-config-airbnb": "^5.0.0",
    "eslint-config-standard": "4.4.0",
    "eslint-plugin-babel": "2.1.1",
    "eslint-plugin-promise": "1.3.1",
    "eslint-plugin-react": "3.16.1",
    "eslint-plugin-standard": "1.3.1",

In 2.x:

    "eslint-config-airbnb": "^5.0.0",
    "eslint-plugin-babel": "2.1.1",
    "eslint-plugin-react": "3.16.1",

Three missing packages bother me in particular:

  • eslint-config-standard (removed)
  • eslint-config-standard-react (never provided, but react plugin is?)
  • eslint-plugin-promise (removed)

Is there any possibility of addressing all three? I'm really starting to consider writing a custom CodeClimate engine because I've had absolutely no stats in CodeClimate for my project for over a couple months now, and the new eslint-2 channel still hasn't solved it.

Problems using shared config

I get an error running analyze using a shared ESLint config:

bash-3.2$ codeclimate analyze
Starting analysis
Running eslint: Done!
error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 1 and stderr "/usr/src/app/node_modules/eslint/lib/config.js:116\n                throw e;\n                      ^\nError: Cannot find module 'eslint-config-nfl'\nReferenced from: /code/.eslintrc\n    at Function.Module._resolveFilename (module.js:336:15)\n    at Function.Module._load (module.js:278:25)\n    at Module.require (module.js:365:17)\n    at require (module.js:384:17)\n    at loadConfig (/usr/src/app/node_modules/eslint/lib/config.js:91:48)\n    at loadConfig (/usr/src/app/node_modules/eslint/lib/config.js:110:44)\n    at getLocalConfig (/usr/src/app/node_modules/eslint/lib/config.js:209:23)\n    at Config.getConfig (/usr/src/app/node_modules/eslint/lib/config.js:351:22)\n    at processFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:178:27)\n    at /usr/src/app/node_modules/eslint/lib/cli-engine.js:332:26\n"

The tool also seems to have issues using eslint plugins:

bash-3.2$ codeclimate analyze
Starting analysis
Running eslint: Done!
error: (CC::Analyzer::Engine::EngineFailure) engine eslint failed with status 1 and stderr "module.js:338\n    throw err;\n          ^\nError: Cannot find module 'eslint-plugin-react'\n    at Function.Module._resolveFilename (module.js:336:15)\n    at Function.Module._load (module.js:278:25)\n    at Module.require (module.js:365:17)\n    at require (module.js:384:17)\n    at /usr/src/app/node_modules/eslint/lib/cli-engine.js:107:26\n    at Array.forEach (native)\n    at loadPlugins (/usr/src/app/node_modules/eslint/lib/cli-engine.js:98:21)\n    at processFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:179:5)\n    at /usr/src/app/node_modules/eslint/lib/cli-engine.js:332:26\n    at /usr/src/app/node_modules/eslint/lib/util/traverse.js:61:17\n"

The shared config / plugins are installed locally to the project. However the issues still occur even when installing them globally.

Does the eslint engine support customized parser?

Hi,
I'm using the babel-eslint as parser, but the engine complains Cannot find module 'babel-eslint'

.eslintrc:

{
  "parser": "babel-eslint",          // https://github.com/babel/babel-eslint
  "plugins": [
    "react"                          // https://github.com/yannickcr/eslint-plugin-react
  ],
  "env": {
    "es6": true,
    "node": true
  },
  "ecmaFeatures": {
    "modules": true,
    "jsx": true
...

my .codeclimate.yml

engines:
  eslint:
    enabled: true

Allow versions for sharable configs

It would be great to have a way to target specific versions of sharable configs from the .codeclimate.yml or some other mechanism.

Use case: I'm using the hosted version of codeclimate and channel-3 of eslint. My config extends google and I've updated to their newest version (v0.7.0) but it looks like the engine's dependencies haven't been updated yet (on v0.6.0 it looks like).

Google's newest update is actually pretty significant in terms of lint checks such as requiring dangling commas in objects. That in itself throws hundreds of warnings for my codebase. Simply updating the engine with the newest build would solve my issue, but probably confuse all other google-sharable-config users on codeclimate. Thus, it would be great if we could target our own dependencies at a config level!

Add support for new ESLint configuration file formats

via http://eslint.org/docs/user-guide/configuring#configuration-file-formats

ESLint supports configuration files in several formats:

  • JavaScript - use .eslintrc.js and export an object containing your configuration.
  • YAML - use .eslintrc.yaml or .eslintrc.yml to define the configuration structure.
  • JSON - use .eslintrc.json to define the configuration structure. ESLint’s JSON files also allow JavaScript-style comments.
  • Deprecated - use .eslintrc, which can be either JSON or YAML.
  • package.json - create an eslintConfig property in your package.json file and define your configuration there.

If there are multiple configuration files in the same directory, ESLint will only use one. The priority order is:

  1. .eslintrc.js
  2. .eslintrc.yaml
  3. .eslintrc.yml
  4. .eslintrc.json
  5. .eslintrc
  6. package.json

eslint-plugin-import resolvers

Hello!

Do you plan to add eslint-plugin-import resolvers for webpack (and node)?
It will be awesome since this plugin needs to resolve webpack aliases and modules for a complete analysis.

I'm almost disabling it completely since my apps rely on these features.

    checks:
      import/no-duplicates:
        enabled: false
      import/no-extraneous-dependencies:
        enabled: false
      import/no-named-as-default-member:
        enabled: false
      import/no-unresolved:
        enabled: false

Thanks

Support external ESLint configs

For my organization's projects and my own I use an external npm package that houses my eslint config. It would be nice to support this workflow as eslint configs change slowly so sharing via npm package or similar means is a fairly common practice. This workflow is described in ESLint's shareable configs documentation.

Symlinks cause problems with exclude_paths

Heya - I ran into a problem with exclude_paths and symlinks that took me a while to figure out. It's not clear to me if it's a bug in codeclimate-eslint or the codeclimate base (or even if it's a bug at all), but :

I have a directory structure like:

- vendor
  \-  javascripts
  \-  stylesheets

Both of javascripts & stylesheets are symlinked to another directory. My exclude_paths is set to vendor/**/*.

It appears that when figuring out which files to exclude, CC doesn't follow symlinks. However, when figuring out which files to analyse, CC-Eslint does follow symlinks, so it was analysing all my files under the symlinked directory.

It's fixable from the user's side by setting exclude_paths to :

- vendor/javascripts/**/*
- vendor/stylesheets/**/*

but I wonder if either the codeclimate repo should be updated to follow symlinks, or codeclimate-eslint should be updated to ignore them. WDYT?

eslint-3 channel

Hi! Any news about supporting eslint v3 and related upgraded plugins?

This is what we are using in development right now:

    "eslint": "3.3.1",
    "eslint-config-airbnb": "10.0.1",
    "eslint-plugin-import": "1.13.0",
    "eslint-plugin-jsx-a11y": "2.1.0",
    "eslint-plugin-react": "6.1.2",

Thanks 👍

Segmentation fault, error: (CC::Analyzer::Engine::EngineFailure) engine eslint:eslint-2 failed with status 139 and stderr

I got this error after running CODECLIMATE_DEBUG=1 codeclimate analyze
Running the ESLint without codeclimate (eslint .) was successful in local without any issue.

I also tried with different formats and that also returning the error (CODECLIMATE_DEBUG=1 codeclimate analyze -f json, CODECLIMATE_DEBUG=1 codeclimate analyze -f html).

[DEBUG] eslint:eslint-2 engine output:
error: (CC::Analyzer::Engine::EngineFailure) engine eslint:eslint-2 failed with status 139 and stderr

ESLint is running with the parser.
Segmentation fault

[DEBUG] backtrace: /usr/src/app/lib/cc/analyzer/raising_container_listener.rb:23:in `finished'
    /usr/src/app/lib/cc/analyzer/composite_container_listener.rb:17:in `block in finished'
    /usr/src/app/lib/cc/analyzer/composite_container_listener.rb:17:in `each'
    /usr/src/app/lib/cc/analyzer/composite_container_listener.rb:17:in `finished'
    /usr/src/app/lib/cc/analyzer/container.rb:74:in `run'
    /usr/src/app/lib/cc/analyzer/engine.rb:52:in `run'
    /usr/src/app/lib/cc/analyzer/engines_runner.rb:60:in `block in run_engine'
    /usr/src/app/lib/cc/analyzer/formatters/plain_text_formatter.rb:74:in `with_spinner'
    /usr/src/app/lib/cc/analyzer/formatters/plain_text_formatter.rb:55:in `block in engine_running'
    /usr/src/app/lib/cc/analyzer/formatters/formatter.rb:18:in `engine_running'
    /usr/src/app/lib/cc/analyzer/formatters/plain_text_formatter.rb:54:in `engine_running'
    /usr/src/app/lib/cc/analyzer/engines_runner.rb:59:in `run_engine'
    /usr/src/app/lib/cc/analyzer/engines_runner.rb:23:in `block in run'
    /usr/src/app/lib/cc/analyzer/engines_runner.rb:23:in `each'
    /usr/src/app/lib/cc/analyzer/engines_runner.rb:23:in `run'
    /usr/src/app/lib/cc/cli/analyze.rb:20:in `block in run'
    /usr/src/app/lib/cc/cli/analyze.rb:18:in `chdir'
    /usr/src/app/lib/cc/cli/analyze.rb:18:in `run'
    /usr/src/app/lib/cc/cli/command.rb:24:in `execute'
    /usr/src/app/lib/cc/cli/runner.rb:22:in `run'
    /usr/src/app/lib/cc/cli/runner.rb:8:in `run'
    /usr/src/app/bin/codeclimate:6:in `<main>'

Definition for rule 'react/jsx-filename-extension' was not found

How do I solve this?

My YML:

engines:
  eslint:
    enabled: true
  apexmetrics:
    enabled: true
    checks:
      AvoidLogicInTrigger:
        enabled: false
languages:
  JavaScript: true
ratings:
  paths:
    - "**.js"
    - "**.cls"
    - "**.trigger"
exclude_paths:
  - "tests/*"
  - "sfserver/app.js"
  - "sfserver/websocket/websocket.js"
  - "js_source/static/*"

ESLint check fails for `quotes` rule with allowTemplateLiterals

For this rule:

"quotes": [2, "single", {"allowTemplateLiterals": true}]

CodeClimate is showing me this error:

Error: /code/.eslintrc:
	Configuration for rule "quotes" is invalid:
	Value "[object Object]" must be an enum value.

    at validateRuleOptions (/usr/src/app/node_modules/eslint/lib/config/config-validator.js:102:15)
    at /usr/src/app/node_modules/eslint/lib/config/config-validator.js:148:13
    at Array.forEach (native)
    at Object.validate (/usr/src/app/node_modules/eslint/lib/config/config-validator.js:147:35)
    at Object.load (/usr/src/app/node_modules/eslint/lib/config/config-file.js:394:19)
    at loadConfig (/usr/src/app/node_modules/eslint/lib/config.js:74:33)
    at getLocalConfig (/usr/src/app/node_modules/eslint/lib/config.js:177:23)
    at Config.getConfig (/usr/src/app/node_modules/eslint/lib/config.js:272:22)
    at CLIEngine.getConfigForFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:715:29)
    at module.exports (/usr/src/app/lib/validate_config.js:9:22)

I am using "eslint": "^3.12.2" in my local system and it doesn't show any problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.