Coder Social home page Coder Social logo

codacy-eslint-legacy's People

Stargazers

 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

codacy-eslint-legacy's Issues

[enhancement] Allow to add Plugin js to ESLint engine

This issue was created after a Skyoe chat with @rtfpessoa.

Salesforce.com has a new UI technology called Lightning which heavily relies on Javascript. To check code style and security Salesforce provide a so called Lightning CLI based on Heroku CLI. For its checks it uses ESLint plus custom rules/plugins.

Salesforce.com developers who want to continously check their code using Codacy.com now have a problem. They have to run the local Lightning CLI and Codacy.com ESLint to check their code.

The goal of this issue is to find out if the CLI rules and plugins are in a way integratable into Codacy.

Receiving errors for resolving webpack

Receiving these errors on codacy but not locally

Resolve error: Cannot find module 'webpack' (import/no-extraneous-dependencies)

on lines like

import 'whatwg-fetch';

here is my .eslintrc

  "parser": "babel-eslint",
  "cache": true,
  "env": {
    "browser": true,     // browser global variables.
    "node": true,        // Node.js global variables and Node.js-specific rules.
    "es6": true,
    "jasmine": true     // adds all of the Jasmine testing global variables for version 1.3 and 2.0.
  },
  "globals": {
    "__ENV__": true,
    "__DROPSHIPPER_API__": true,
    "__CATALOG_API__": true,
    "__VERSION_NPM__": true,
    "__VERSION_GIT__": true,
    "__TEST__": true,
    "Bugsnag": true
  },
  "plugins": [
    "import"
  ],
  "extends": [
    "airbnb",
    "plugin:import/errors",
    "plugin:import/warnings"
  ],
  "rules": {
    "import/no-unresolved": [1],
    "import/extensions": [0],
    "import/default": [0],
    "import/prefer-default-export": [0],
    "no-constant-condition": [0],
    "no-param-reassign": [0],
    "react/jsx-filename-extension": [0],
    "react/prefer-stateless-function": [2, { "ignorePureComponents": true }],
    "react/jsx-closing-bracket-location": [0],
    "react/jsx-boolean-value": [0],
    "class-methods-use-this": [0],
    "no-class-assign": [0]
  },
  "settings": {
    "import/resolver": "webpack"
  }
}

Used packages versions are incompatible

Hello,

I come across some issues with codacy-eslint.
In our project we use airbnb rules preset for typescript:

'extends': [
    'airbnb-typescript',
],

Locally eslint works well and I do not get any warnings. But in our github repos we use codacy to CI. And here we get some warnings like: Definition for rule '...' was not found

As I can see, your built script build.sbt installs a lot of packages with specific versions.
It installs for example [email protected] which requires @typescript-eslint/eslint-plugin@^2.3.0.

But build.sbt installs only @typescript-eslint/[email protected] and this version of the package
doesn't consist some rules which are needed in [email protected].

For example:

  • @typescript-eslint/no-empty-function
  • @typescript-eslint/quotes
  • @typescript-eslint/brace-style
    And probably others.

We also have similar issues between slint-config-airbnb-typescript and eslint-plugin-react packages (rule: react/jsx-curly-newline)

What should we do to cope with it?

Flowtype

As far as I can tell, ESLint will use some shared configs, including the eslint-plugin-flowtype

However this plugin only works properly if ESLint is using the babel-eslint parser instead of the regular parser, as stated in the installation instructions

This is relevant because eslint doesn't understand type annotations, rendering Flowtype files useless.

ESLint 6

We are migrating our application to typescript. For a while we will have a mixed codebase of javascript and typescript. We would like to lint both types of file in the same way. To do this we would use the overrides -> extends functionality in the .eslintrc something like this:

  "overrides": [
    {
      "files": ["*.ts", "*.tsx"],
      "parser": "@typescript-eslint/parser",
      "plugins": ["@typescript-eslint"],
      "extends": [
        "plugin:@typescript-eslint/eslint-recommended",
        "plugin:@typescript-eslint/recommended",
        "prettier/@typescript-eslint"
      ],
     ...

This functionality only works correctly in eslint 6+ (issue here). Are there plans to update the version of eslint used here to version 6? Can I submit a PR to do this?

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.