Skip to content

open-turo/eslint-config-typescript

Repository files navigation

@open-turo/eslint-config-typescript

Turo eslint configuration for typescript.

Release Tests pass/fail License Contributions welcome CI semantic-release: angular Conventional commits Join us!

Usage

Install the package and all of its peer dependencies:

npx install-peerdeps --dev @open-turo/eslint-config-typescript

eslint.config.js (requires eslint>=v8.23.0)

import turoConfig from "@open-turo/eslint-config-typescript";

export default turoConfig();

The turoConfig function accepts an options object with the following properties:

  • allowModules - List of modules to allow in the n/no-unpublished-import rule. Defaults to ["@jest/globals", "nock"] for Jest or ["nock"] for Vitest
  • ignores - List of patterns to ignore
  • typescript - Whether to include typescript rules. Defaults to true
  • ecmaVersion - The ECMAScript version to use. Defaults to latest
  • testFramework - Test framework to use: "jest" (default) or "vitest"

Vitest Configuration Example

import turoConfig from "@open-turo/eslint-config-typescript";

export default turoConfig({
  testFramework: "vitest",
});

Development

Install pre-commit and the commit hooks:

pre-commit install
pre-commit install --hook-type commit-msg

Get Help

Please review Issues, post new Issues against this repository as needed.

Contributions

Please see here for guidelines on how to contribute to this project.

About

Turo's ESLint config for Typescript

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors