Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @berlysia/eslint-config with all npm packages installed. Try it out:

var eslintConfig = require("@berlysia/eslint-config")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@berlysia/eslint-config v1.2.2

@berlysia/eslint-config

ESLint config for myself

Features

  • React
  • TypeScript
  • prettier

Install

$ yarn add --dev eslint @berlysia/eslint-config
$ npm install --save-dev eslint @berlysia/eslint-config

Config

in .eslintrc

{
  "extends": ["@berlysia/eslint-config/auto"]
}

opt-in rules for TypeScript

{
  "extends": [
    "@berlysia/eslint-config/auto"
    "@berlysia/eslint-config/typescript-with-type"
  ],
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}

Manual Config

in .eslintrc

{
  "extends": [
    "@berlysia" // base
  ],
  "overrides": [
    {
      "files": [
        "*.{test,spec}.{js,ts,jsx,tsx}",
        "**/__tests__/**/*.{js,ts,jsx,tsx}"
      ],
      "extends": "@berlysia/eslint-config/jest"
    },
    {
      "files": ["*.{ts,tsx}"],
      "extends": "@berlysia/eslint-config/typescript-without-type"
    },
    {
      "files": ["*.{ts,tsx}"],
      "extends": "@berlysia/eslint-config/typescript-with-type",
      "parserOptions": {
        "project": "./tsconfig.json"
      }
    }
  ]
}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free