eslint-flat-config-gitignore
v2.0.0
Published
ESLint flat config for ignoring files listed in .gitignore
Downloads
140
Maintainers
Readme
eslint-flat-config-gitignore
ESLint flat config for ignoring files listed in .gitignore.
Usage
import eslint from "@eslint/js";
import prettier from "eslint-config-prettier";
import { gitignore } from "eslint-flat-config-gitignore";
import tsESLint from "typescript-eslint";
export default tsESLint.config(
await gitignore(import.meta.dirname),
eslint.configs.recommended,
{
files: ["**/*.{ts,tsx,cts,mts}"],
extends: [...tsESLint.configs.recommendedTypeChecked, ...tsESLint.configs.stylisticTypeChecked],
languageOptions: { parserOptions: { project: true, tsConfigRootDir: import.meta.dirname } },
rules: {
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
},
},
prettier,
);