@open-turo/eslint-config-typescript
v18.1.25
Published
Turo eslint configuration for typescript
Downloads
28,603
Readme
@open-turo/eslint-config-typescript
Turo eslint configuration for typescript.
Usage
Install the package and all of its peer dependencies:
npx install-peerdeps --dev @open-turo/eslint-config-typescripteslint.config.js (requires eslint>=v8.23.0)
const turoConfig = require("@open-turo/eslint-config-typescript");
module.exports = turoConfig();The turoConfig function accepts an options object with the following properties:
allowModules- List of modules to allow in then/no-unpublished-importrule. Defaults to["@jest/globals", "nock"]for Jest or["nock"]for Vitestignores- List of patterns to ignoretypescript- Whether to include typescript rules. Defaults totrueecmaVersion- The ECMAScript version to use. Defaults tolatesttestFramework- Test framework to use:"jest"(default) or"vitest"
Vitest Configuration Example
const turoConfig = require("@open-turo/eslint-config-typescript");
module.exports = turoConfig({
testFramework: "vitest",
});.eslintrc (legacy example)
{
"extends": "@open-turo/eslint-config-typescript/recommended"],
}You will have to set the ESLINT_USE_FLAT_CONFIG env var to true.
Development
Install pre-commit and the commit hooks:
pre-commit install
pre-commit install --hook-type commit-msgGet 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.
