1.1.2 • Published 4 months ago

@builtbysasha/eslint-config v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

eslint

Home page

Description

This package contains linting rules for .js / .ts / .tsx files.

Installation

yarn add @builtbysasha/eslint-config -D

Setup

Add the following to your .eslintrc file:

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

JavaScript-based projects

{
  "extends": [
    "@builtbysasha/eslint-config"
  ],
  "parserOptions": {
    "ecmaVersion": "latest",
    "sourceType": "module"
  }
}

TypeScript-based projects

{
  "extends": [
    "@builtbysasha/eslint-config/typescript"
  ],
  "parserOptions": {
    "ecmaVersion": "latest",
    "sourceType": "module"
  },
  "parser": "@typescript-eslint/parser"
}

React-Typescript-based projects

{
  "extends": [
    "plugin:react/recommended",
    "@builtbysasha/eslint-config/react-ts"
  ],
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": "latest",
    "sourceType": "module"
  },
  "parser": "@typescript-eslint/parser"
}