Git Product home page Git Product logo

gradle-eslint-plugin's Introduction

Gradle ESLint Plugin

This is a Gradle plugin for running ESLint as part of your Gradle build.

Usage

  1. Install ESLint via npm: npm install eslint

  2. Add the following to your build.gradle

     buildscript {
         repositories {
             maven {
                 url "https://plugins.gradle.org/m2/"
             }
         }
         dependencies {
             classpath "gradle.plugin.com.github.scobal.eslint:gradle-eslint-plugin:1.0.4"
         }
     }
    
     apply plugin: "com.github.scobal.eslint"
    
  3. Configure ESLint to include your Javascript files in your build.gradle

     eslint {
         inputs = ["**/*.js*"]
     }
    
  4. Run gradle eslint

Configuration

The goal of this plugin is to support as fully as possible the command line interface described here:

http://eslint.org/docs/user-guide/command-line-interface

This is a list of the available options for use inside the eslint configuration block:

Option Description
executable The path to an eslint executable, eg: "/usr/bin/eslint"
inputs A list of files, directories and/or globs, eg: ["service.js", "src/controllers/", "**/*.js"]
config The path to an eslint configuration file, eg: "/home/scobal/esconfig"
noEslintrc Boolean to disable the use of .eslintrc, eg: true
env A list of environments as strings, eg: ["environment_1", "environment_2"]
ext A list of Javascript file extensions as strings, eg: [".js", ".jsx"]
global A list of global variables as strings, eg: ["global_1", "global_1"]
parser The parser to be used, eg: "espree"
parserOptions Specify parser options
cache Boolean to only check changed files, eg: true
cacheFile The path to an eslint cache file, eg: "/tmp/eslint_cache/file"
cacheLocation The path to an eslint cache file or directory, eg: "/tmp/eslint_cache"
rulesDir A list of directories with additional rules, eg: ["/eslint/rules_1", "/eslint/rules_2"]
plugin A list of plugins as strings, eg: ["plugin_1", "plugin_2"]
rule Specify rules
outputFile The path to the output file, eg: "/home/scobal/report.out"
format The format of the output file, eg: "checkstyle"

License

gradle-eslint-plugin is licensed under version 2.0 of the Apache License. See the LICENSE file for details.

Development

Build Status

gradle-eslint-plugin's People

Contributors

scobal avatar alexejk avatar

Watchers

nobusugi246 avatar James Cloos 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.