module.exports = {
	root: true,
	env: { browser: true, es2020: true },
	extends: [
		"airbnb",
		"airbnb/hooks",
		"eslint:recommended",
		"plugin:react/recommended",
		"plugin:react/jsx-runtime",
		"plugin:react-hooks/recommended",
		"plugin:prettier/recommended",
		"plugin:@tanstack/eslint-plugin-query/recommended"
	],
	ignorePatterns: ["dist", ".eslintrc.cjs"],
	parserOptions: {
		ecmaFeatures: {
			jsx: true
		},
		ecmaVersion: "latest",
		sourceType: "module"
	},
	settings: {
		"import/resolver": {
			node: {
				extensions: [".js", ".jsx"]
			},
			alias: {
				map: [["@", "./src"]],
				extensions: [".js", ".jsx"]
			}
		}
	},
	plugins: ["react-refresh", "@tanstack/query"],
	rules: {
		"react/jsx-no-target-blank": "off",
		"react/react-in-jsx-scope": "off",
		"react/jsx-props-no-spreading": "off",
		"react/jsx-filename-extension": [1, { extensions: [".jsx", ".js"] }],
		"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
		"prettier/prettier": ["error", { endOfLine: "auto" }],
		"@tanstack/query/exhaustive-deps": "error",
		"@tanstack/query/no-rest-destructuring": "warn",
		"@tanstack/query/stable-query-client": "error"
	}
};