GithubHelp home page GithubHelp logo

isabella232 / eslint-config-ory-am-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ory/eslint-config-ory-am-react

0.0 0.0 0.0 11 KB

The ESLint configuration used by Ory (React specific)

License: Apache License 2.0

JavaScript 100.00%

eslint-config-ory-am-react's Introduction

ory.am/eslint-config-ory-am-react

Installation

Install ESLint and the our configuration. You will probably also want to use eslint-config-ory-am

npm install --save-dev eslint eslint-config-ory-am eslint-config-ory-am-react

Create a .eslintrc.json file in your root with the following content:

{
  "extends": [
    "eslint-config-ory-am",
    "eslint-config-ory-am-react"
  ],
  "env": {
    "node": true,
    "browser": true
  }
}

Add a linter script to your package.json. In the following example, all files in the src and test folder (and their subfolders) are checked:

{
  "scripts": {
    "lint": "eslint \"+(src|test)/**/*.js\" --fix"
  }
}

Watcher task

You can use chokidar-cli to add a task that lints your files on save. First install it:

npm install --save-dev chokidar-cli

Then add a watch script to your package.json. In the following example, chokidar will look for changes in any files in the src and test folder (and their subfolders):

{
  "scripts": {
    "lint": "eslint \"+(src|test)/**/*.js\" --fix",
    "lint:watch": "npm run watch:js -- -c \"npm run lint\"",
    "watch:js": "chokidar \"+(src|test)/**/*.js\" --initial"
  }
}

eslint-config-ory-am-react's People

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.