eslint-config-typescript

WebJar for eslint-config-typescript

License

License

MIT
Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

eslint-config-typescript
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

eslint-config-typescript
WebJar for eslint-config-typescript
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/weirdpattern/eslint-config-typescript

Download eslint-config-typescript

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/eslint-config-typescript/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>eslint-config-typescript</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/eslint-config-typescript/
implementation 'org.webjars.npm:eslint-config-typescript:3.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/eslint-config-typescript/
implementation ("org.webjars.npm:eslint-config-typescript:3.0.0")
'org.webjars.npm:eslint-config-typescript:jar:3.0.0'
<dependency org="org.webjars.npm" name="eslint-config-typescript" rev="3.0.0">
  <artifact name="eslint-config-typescript" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='eslint-config-typescript', version='3.0.0')
)
libraryDependencies += "org.webjars.npm" % "eslint-config-typescript" % "3.0.0"
[org.webjars.npm/eslint-config-typescript "3.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

eslint-config-typescript

An opinionated set of ESLint rules for TypeScript projects

Installation

Install eslint-config-typescript:

$ npm install --save-dev eslint-config-typescript

Then, add eslint-config-typescript to the "extends" array in your ESLint file. Make sure to put it last, so it gets the chance to override other configs.

{
  "extends": [
    "typescript"
  ]
}

A few ESLint plugins are supported as well:

{
  "extends": [
    "typescript",
    "typescript/react",
    "typescript/prettier",
    "typescript/prettier-react"
  ]
}

Note: typescript/prettier-react will automatically import typescript/prettier.

Example configuration

Using default prettier configurations:

{
  "extends": [
    "typescript",
    "typescript/prettier"    
  ],
  "plugins": ["filenames", "jest"],
  "env": {    
    "jest": true,
    "node": true
  },
  "rules": {
    "filenames/no-index": "error",
    "filenames/match-exported": ["error", "kebab"],
    "jest/no-disabled-tests": "error",
    "jest/no-focused-tests": "error",
    "jest/no-identical-title": "error",
    "jest/valid-expect": "error"
  }
}

Using specific react configurations:

{
  "extends": [
    "typescript",
    "typescript/react",
    "typescript/prettier-react"
  ],
  "plugins": ["filenames", "jest"],
  "env": {    
    "jest": true,
    "node": true
  },
  "rules": {
    "filenames/no-index": "error",
    "filenames/match-exported": ["error", "kebab"],
    "jest/no-disabled-tests": "error",
    "jest/no-focused-tests": "error",
    "jest/no-identical-title": "error",
    "jest/valid-expect": "error",
    "prettier/prettier": [
      "error",
      {
        "semi": false,
        "tabWidth": 4,
        "singleQuote": true
      }
    ]
  }
}

Versions

Version
3.0.0