52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
import eslint from "@eslint/js";
|
|
import stylistic from "@stylistic/eslint-plugin";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default tseslint.config({
|
|
extends: [
|
|
eslint.configs.recommended,
|
|
tseslint.configs.recommendedTypeChecked,
|
|
],
|
|
files: ["packages/*/src/**/*.{ts,tsx}"],
|
|
plugins: {
|
|
"@stylistic": stylistic,
|
|
"react-hooks": reactHooks,
|
|
},
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
|
"@stylistic/member-delimiter-style": ["error", {
|
|
singleline: {
|
|
delimiter: "comma",
|
|
requireLast: false,
|
|
},
|
|
multiline: {
|
|
delimiter: "comma",
|
|
requireLast: true,
|
|
},
|
|
overrides: {
|
|
interface: {
|
|
singleline: {
|
|
delimiter: "semi",
|
|
},
|
|
multiline: {
|
|
delimiter: "semi",
|
|
},
|
|
},
|
|
},
|
|
}],
|
|
"@stylistic/semi": ["error", "always"],
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-namespace": "off",
|
|
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
"react-hooks/exhaustive-deps": "error",
|
|
"react-hooks/rules-of-hooks": "error",
|
|
},
|
|
});
|