taevas.xyz/eslint.config.mjs

47 lines
962 B
JavaScript
Raw Normal View History

import react from "eslint-plugin-react";
2024-10-31 20:04:15 +01:00
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
2025-02-16 17:05:02 +01:00
import stylistic from "@stylistic/eslint-plugin";
export default tseslint.config(
2025-02-16 17:05:02 +01:00
react.configs.flat.recommended,
eslint.configs.recommended,
...tseslint.configs.recommended,
2025-02-16 17:05:02 +01:00
...tseslint.configs.stylisticTypeChecked,
{
settings: {
react: {
version: "detect",
}
}
},
2025-02-16 17:05:02 +01:00
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
2025-02-16 17:05:02 +01:00
}
}
},
{
plugins: {
2025-02-16 17:05:02 +01:00
"@stylistic": stylistic,
},
rules: {
2025-02-16 17:05:02 +01:00
"@stylistic/quotes": ["error", "double"],
"@stylistic/indent": ["error", 2],
"@stylistic/semi": ["error", "always"],
"react/no-unescaped-entities": "off",
"no-async-promise-executor": "off",
}
},
{
ignores: [
"dist/*",
"*.js",
"*.cjs",
"*.mjs",
],
}
)