Coder Social home page Coder Social logo

codacy-eslint-1's Introduction

Codacy ESLint

Adding new plugins / configs

  1. Install the package using npm:

    npm install <package-name>
  2. [Plugins only] Add the plugin to the plugins section in the file src/eslintDefaultOptions.ts only if it's stated in the plugin's documentation

  3. [Plugins only] If the plugin has descriptions for rules on GitHub, reference them at src/docGeneratorMain.ts to include them on the generated documentation. To do this, add a section similar to the following example:

    console.log("Generate xss description files")
    await docGenerator.downloadDocs(
      (pattern) =>
        `${githubBaseUrl}/Rantanen/eslint-plugin-xss/master/docs/rules/${pattern}.md`,
      "xss", // this is the pattern's prefix, like: xss/some-pattern-id
      false // Add false for plugins not having .md files for all the patterns
    )
  4. Generate documentation so it adds the new plugin documentation

Generating documentation

npm install
npm run generateDocs

Test changes to codacy-seed locally

You may need to test changes that comes from our codacy-engine-typescript-seed.

  1. Create a package with your changes on the seed:

    • Don't forget to update the dependencies: npm install
    • Compile the library: npm run compile
    • Package the library: npm pack

      This should generate a codacy-seed-0.0.1.tgz on your codacy-seed repository

  2. Copy the codacy-seed-0.0.1.tgz into the root of this repository

  3. Install the package: npm install codacy-seed-0.0.1.tgz

  4. Update Dockerfile and .dockerignore so you copy the codacy-seed-0.0.1.tgz inside the docker you will be building

    • Add !codacy-seed-0.0.1.tgz to your .dockerignore
    • Add the package to the docker before RUN npm install: COPY codacy-seed-0.0.1.tgz ./
    • Remove multi-stage docker steps
      • Lines from FROM node:$NODE_IMAGE_VERSION to RUN rm -rf /package.json /package-lock.json

      This way you skip copying the files to the other docker, and another npm install

  5. Publish your docker locally as normal: docker build -t codacy-eslint:local .

Limitations

Incompatible rules

There are some ESLint rules that will be ignored when running this Docker container. For more details on the ignored rules, check blacklistRegexes defined at blacklist.ts.

Usually, these rules need an Internet connection and/or to check node_modules, and would not run successfully on our Docker container environment.

What is Codacy

Codacy is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.

Among Codacy’s features

  • Identify new Static Analysis issues
  • Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)
  • Auto-comments on Commits and Pull Requests
  • Integrations with Slack, HipChat, Jira, YouTrack
  • Track issues in Code Style, Security, Error Proneness, Performance, Unused Code and other categories

Codacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.

Codacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others.

Free for Open Source

Codacy is free for Open Source projects.

codacy-eslint-1's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar lolgab avatar machadoit avatar josemiguelmelo avatar hjrocha avatar vascorsd avatar heliocodacy avatar squallstar avatar pedrocodacy avatar cobaltt7 avatar dan-codacy avatar stefanvacareanu7 avatar fregante avatar franciscodua avatar gjsduarte avatar stephen333 avatar

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.