@tommy-mitchell/eslint-config-xo 2.0.0-beta.2 → 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/readme.md +1 -0
- package/src/index.d.ts +1 -0
- package/src/react.js +1 -0
- package/src/tailwind.js +1 -0
- package/src/tanstack.js +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tommy-mitchell/eslint-config-xo",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.4",
|
|
4
4
|
"description": "Personal config for XO.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@eslint-react/eslint-plugin": "^3.0.0",
|
|
32
32
|
"@next/eslint-plugin-next": "^16.0.5",
|
|
33
|
+
"@tanstack/eslint-plugin-router": "^1.161.6",
|
|
33
34
|
"eslint-plugin-better-tailwindcss": "^4.3.2",
|
|
34
35
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
35
36
|
"eslint-plugin-perfectionist": "^5.7.0",
|
package/readme.md
CHANGED
|
@@ -60,6 +60,7 @@ export default [
|
|
|
60
60
|
...configs.xo,
|
|
61
61
|
...configs.react({ version: "19" }), // If using React
|
|
62
62
|
...configs.next, // If using Next.js
|
|
63
|
+
...configs.tanstack, // If using TanStack Start
|
|
63
64
|
...configs.tailwind({ config: "src/tailwind.css" }), // If using TailwindCSS
|
|
64
65
|
...configs.dprint, // If using dprint (must be last to override stylistic rules)
|
|
65
66
|
// Plus any overrides
|
package/src/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export declare const dprint: FlatXoConfig;
|
|
|
4
4
|
export declare const next: FlatXoConfig;
|
|
5
5
|
export declare const react: FlatXoConfig;
|
|
6
6
|
export declare const tailwind: ({ config }: { config: string; }) => FlatXoConfig;
|
|
7
|
+
export declare const tanstack: FlatXoConfig;
|
|
7
8
|
export declare const xo: FlatXoConfig;
|
package/src/react.js
CHANGED
|
@@ -19,6 +19,7 @@ export default [jsxA11y.flatConfigs.recommended, {
|
|
|
19
19
|
rules: {
|
|
20
20
|
"perfectionist/sort-jsx-props": ["error", {
|
|
21
21
|
customGroups: [
|
|
22
|
+
// TODO: move groups to a constant for reuse
|
|
22
23
|
{ elementNamePattern: "^on[A-Z].*", groupName: "callback" },
|
|
23
24
|
{ elementNamePattern: "^(children|dangerouslySetInnerHTML|key|ref)$", groupName: "reserved" },
|
|
24
25
|
],
|
package/src/tailwind.js
CHANGED
package/src/tanstack.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import pluginRouter from "@tanstack/eslint-plugin-router";
|
|
2
|
+
import { reactRefresh } from "eslint-plugin-react-refresh";
|
|
3
|
+
|
|
4
|
+
/** @type {import('xo').FlatXoConfig} */
|
|
5
|
+
export default [
|
|
6
|
+
...pluginRouter.configs["flat/recommended"],
|
|
7
|
+
// https://github.com/ArnaudBarre/eslint-plugin-react-refresh/issues/102#issuecomment-3881982814
|
|
8
|
+
reactRefresh.configs.vite({
|
|
9
|
+
extraHOCs: [
|
|
10
|
+
"createFileRoute",
|
|
11
|
+
"createLazyFileRoute",
|
|
12
|
+
"createRootRoute",
|
|
13
|
+
"createRootRouteWithContext",
|
|
14
|
+
"createLink",
|
|
15
|
+
"createRoute",
|
|
16
|
+
"createLazyRoute",
|
|
17
|
+
],
|
|
18
|
+
}),
|
|
19
|
+
];
|