3.1.1 • Published 2 years ago

@twostoryrobot/eslint-config v3.1.1

Weekly downloads
557
License
MIT
Repository
github
Last release
2 years ago

npm (scoped)

TSR eslint

The Two Story Robot sharable eslint configuration so you can lint like us.

Usage

First, install the package:

npm install --save-dev @twostoryrobot/eslint-config

Node.js

Create an .eslintrc.js file:

module.exports = {
  extends: '@twostoryrobot'
}

Then add the eslint command to your package.json:

{
  "scripts": {
    "eslint": "eslint '**/*.js'"
  }
}

You can then run eslint manually with npm run eslint. We also recommend running eslint as part of your tests using jest-runner-eslint.

Create React App

Add our config to the existing eslintConfig key generated in package.json:

{
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest",
      "@twostoryrobot/eslint-config/react"
    ]
  }
}

Then add the eslint command to your package.json:

{
  "scripts": {
    "eslint": "eslint '**/*.js'"
  }
}

CRA will automatically run lint checks as part of the build. You can also run them manually with npm run eslint.

Developers may want to set ESLINT_NO_DEV_ERRORS=true to avoid eslint errors halting the build in development (they will still error in production builds).

Next.js

Create an .eslintrc.js file:

module.exports = {
  extends: '@twostoryrobot/eslint-config/next'
}

Then add the eslint command to your package.json:

{
  "scripts": {
    "eslint": "eslint '**/*.js'",
  }
}

Next.js will automatically run lint checks as part of the production build. You can also run them manually with npm run eslint.

3.1.1

2 years ago

3.1.0

2 years ago

3.0.1

3 years ago

3.0.0

4 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago