44 lines
769 B
JavaScript
44 lines
769 B
JavaScript
import js from "@eslint/js";
|
|
import ts from "typescript-eslint";
|
|
import prettier from "eslint-config-prettier";
|
|
import globals from "globals";
|
|
import { defineConfig } from "eslint/config";
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default defineConfig([
|
|
{
|
|
linterOptions: {
|
|
reportUnusedDisableDirectives: "off",
|
|
},
|
|
},
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
prettier,
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.ts", "**/*.tsx"],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: ts.parser,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{
|
|
prefer: 'type-imports',
|
|
fixStyle: 'separate-type-imports'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
]);
|