@touchspot/eslint-config 1.4.0 → 1.5.0
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/dist/src/presets/next.d.ts +3 -1
- package/dist/src/presets/next.d.ts.map +1 -1
- package/dist/src/presets/next.js +5 -5
- package/dist/src/presets/next.js.map +1 -1
- package/dist/src/presets/react.d.ts +3 -1
- package/dist/src/presets/react.d.ts.map +1 -1
- package/dist/src/presets/react.js +20 -8
- package/dist/src/presets/react.js.map +1 -1
- package/dist/src/presets/tailwindcss.js +1 -1
- package/dist/src/presets/tailwindcss.js.map +1 -1
- package/package.json +9 -6
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare const next: (
|
|
1
|
+
export declare const next: ({ reactCompiler }?: {
|
|
2
|
+
readonly reactCompiler?: boolean;
|
|
3
|
+
}) => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
4
|
//# sourceMappingURL=next.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/presets/next.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/presets/next.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,IAAI,uBAA8B;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,wEAqCjF,CAAC"}
|
package/dist/src/presets/next.js
CHANGED
|
@@ -3,11 +3,11 @@ import CheckFile from "eslint-plugin-check-file";
|
|
|
3
3
|
import { config } from "typescript-eslint";
|
|
4
4
|
import * as env from "../env.js";
|
|
5
5
|
import { react } from "./react.js";
|
|
6
|
-
export const next = () => config(...env.browser(), ...env.node(), ...react(), {
|
|
7
|
-
name: "@touchspot/eslint-config/
|
|
6
|
+
export const next = ({ reactCompiler = true } = {}) => config(...env.browser(), ...env.node(), ...react({ compiler: reactCompiler }), {
|
|
7
|
+
name: "@touchspot/eslint-config/presets/next/ignore",
|
|
8
8
|
ignores: [".next/**"],
|
|
9
9
|
}, {
|
|
10
|
-
name: "@touchspot/eslint-config/
|
|
10
|
+
name: "@touchspot/eslint-config/presets/next/next",
|
|
11
11
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
12
12
|
plugins: {
|
|
13
13
|
"@next/next": Next,
|
|
@@ -17,7 +17,7 @@ export const next = () => config(...env.browser(), ...env.node(), ...react(), {
|
|
|
17
17
|
...Next.configs["core-web-vitals"].rules,
|
|
18
18
|
},
|
|
19
19
|
}, {
|
|
20
|
-
name: "@touchspot/eslint-config/
|
|
20
|
+
name: "@touchspot/eslint-config/presets/next/check-file",
|
|
21
21
|
files: ["{src/,}app/**/*.{ts,tsx}"],
|
|
22
22
|
plugins: {
|
|
23
23
|
"check-file": CheckFile,
|
|
@@ -26,7 +26,7 @@ export const next = () => config(...env.browser(), ...env.node(), ...react(), {
|
|
|
26
26
|
"check-file/folder-naming-convention": ["error", { "**": "NEXT_JS_APP_ROUTER_CASE" }],
|
|
27
27
|
},
|
|
28
28
|
}, {
|
|
29
|
-
name: "@touchspot/eslint-config/
|
|
29
|
+
name: "@touchspot/eslint-config/presets/next/import-x",
|
|
30
30
|
files: ["{src/,}app/**/*.{ts,tsx}"],
|
|
31
31
|
rules: {
|
|
32
32
|
"import-x/no-default-export": "off",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","sourceRoot":"","sources":["../../../src/presets/next.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,0BAA0B,CAAC;AAC5C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,GAAG,kBAAoB;AACnC,OAAO,EAAE,KAAK,EAAE,mBAA8B;AAE9C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,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
1
1
|
import type { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const react: (
|
|
2
|
+
export declare const react: ({ compiler }?: {
|
|
3
|
+
readonly compiler?: boolean;
|
|
4
|
+
}) => TSESLint.FlatConfig.ConfigArray;
|
|
3
5
|
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/presets/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/presets/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOzD,eAAO,MAAM,KAAK,kBAAyB;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,oCA2ExE,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import Functional from "eslint-plugin-functional";
|
|
2
2
|
import React from "eslint-plugin-react";
|
|
3
|
+
import ReactCompiler from "eslint-plugin-react-compiler";
|
|
3
4
|
import ReactHooks from "eslint-plugin-react-hooks";
|
|
4
5
|
import { config } from "typescript-eslint";
|
|
5
|
-
export const react = () => config({
|
|
6
|
-
name: "@touchspot/eslint-config/
|
|
6
|
+
export const react = ({ compiler = true } = {}) => config({
|
|
7
|
+
name: "@touchspot/eslint-config/presets/react/parser",
|
|
7
8
|
files: ["**/*.{js,jsx,tsx}"],
|
|
8
9
|
languageOptions: {
|
|
9
10
|
parserOptions: {
|
|
@@ -11,7 +12,7 @@ export const react = () => config({
|
|
|
11
12
|
},
|
|
12
13
|
},
|
|
13
14
|
}, {
|
|
14
|
-
name: "@touchspot/eslint-config/
|
|
15
|
+
name: "@touchspot/eslint-config/presets/react/functional",
|
|
15
16
|
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
16
17
|
plugins: {
|
|
17
18
|
functional: Functional,
|
|
@@ -27,11 +28,11 @@ export const react = () => config({
|
|
|
27
28
|
],
|
|
28
29
|
},
|
|
29
30
|
}, {
|
|
30
|
-
name: "@touchspot/eslint-config/
|
|
31
|
+
name: "@touchspot/eslint-config/presets/react/react",
|
|
31
32
|
files: ["**/*.{js,jsx,tsx}"],
|
|
32
33
|
extends: [
|
|
33
|
-
React.configs.flat
|
|
34
|
-
React.configs.flat["jsx-runtime"],
|
|
34
|
+
(React.configs.flat?.["recommended"] ?? {}),
|
|
35
|
+
(React.configs.flat?.["jsx-runtime"] ?? {}),
|
|
35
36
|
],
|
|
36
37
|
settings: {
|
|
37
38
|
react: {
|
|
@@ -50,7 +51,7 @@ export const react = () => config({
|
|
|
50
51
|
"react/self-closing-comp": "error",
|
|
51
52
|
},
|
|
52
53
|
}, {
|
|
53
|
-
name: "@touchspot/eslint-config/
|
|
54
|
+
name: "@touchspot/eslint-config/presets/react/react-hooks",
|
|
54
55
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
55
56
|
plugins: {
|
|
56
57
|
"react-hooks": ReactHooks,
|
|
@@ -59,5 +60,16 @@ export const react = () => config({
|
|
|
59
60
|
"react-hooks/rules-of-hooks": "error",
|
|
60
61
|
"react-hooks/exhaustive-deps": "error",
|
|
61
62
|
},
|
|
62
|
-
}
|
|
63
|
+
}, compiler
|
|
64
|
+
? {
|
|
65
|
+
name: "@touchspot/eslint-config/presets/react/react-compiler",
|
|
66
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
67
|
+
plugins: {
|
|
68
|
+
"react-compiler": ReactCompiler,
|
|
69
|
+
},
|
|
70
|
+
rules: {
|
|
71
|
+
"react-compiler/react-compiler": "error",
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
: {});
|
|
63
75
|
//# sourceMappingURL=react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/presets/react.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/presets/react.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,KAAsC,EAAE,EAAE,EAAE,CAClF,MAAM,CACL;IACC,IAAI,EAAE,+CAA+C;IACrD,KAAK,EAAE,CAAC,mBAAmB,CAAC;IAC5B,eAAe,EAAE;QAChB,aAAa,EAAE;YACd,SAAS,EAAE,IAAI;SACf;KACD;CACD,EACD;IACC,IAAI,EAAE,mDAAmD;IACzD,KAAK,EAAE,CAAC,uBAAuB,CAAC;IAChC,OAAO,EAAE;QACR,UAAU,EAAE,UAAU;KACtB;IACD,KAAK,EAAE;QACN,2BAA2B,EAAE;YAC5B,OAAO;YACP;gBACC,uBAAuB,EAAE,IAAI;gBAC7B,0BAA0B,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE;gBAC5D,qBAAqB,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aACtD;SACD;KACD;CACD,EACD;IACC,IAAI,EAAE,8CAA8C;IACpD,KAAK,EAAE,CAAC,mBAAmB,CAAC;IAC5B,OAAO,EAAE;QACR,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAA+B;QACzE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAA+B;KACzE;IACD,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,OAAO,EAAE,QAAQ;SACjB;KACD;IACD,KAAK,EAAE;QACN,uBAAuB,EAAE,OAAO;QAChC,8BAA8B,EAAE,OAAO;QACvC,yBAAyB,EAAE,OAAO;QAClC,+BAA+B,EAAE,CAAC,OAAO,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;QACtE,sBAAsB,EAAE;YACvB,OAAO;YACP,EAAE,aAAa,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;SAClF;QACD,yBAAyB,EAAE,OAAO;KAClC;CACD,EACD;IACC,IAAI,EAAE,oDAAoD;IAC1D,KAAK,EAAE,CAAC,sCAAsC,CAAC;IAC/C,OAAO,EAAE;QACR,aAAa,EAAE,UAAU;KACzB;IACD,KAAK,EAAE;QACN,4BAA4B,EAAE,OAAO;QACrC,6BAA6B,EAAE,OAAO;KACtC;CACD,EACD,QAAQ;IACP,CAAC,CAAC;QACA,IAAI,EAAE,uDAAuD;QAC7D,KAAK,EAAE,CAAC,sCAAsC,CAAC;QAC/C,OAAO,EAAE;YACR,gBAAgB,EAAE,aAAa;SAC/B;QACD,KAAK,EAAE;YACN,+BAA+B,EAAE,OAAO;SACxC;KACD;IACF,CAAC,CAAC,EAAE,CACL,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import TailwindCSS from "eslint-plugin-tailwindcss";
|
|
2
2
|
import { config } from "typescript-eslint";
|
|
3
3
|
export const tailwindcss = () => config({
|
|
4
|
-
name: "@touchspot/eslint-config/
|
|
4
|
+
name: "@touchspot/eslint-config/presets/tailwindcss/tailwindcss",
|
|
5
5
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
6
6
|
plugins: {
|
|
7
7
|
tailwindcss: TailwindCSS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindcss.js","sourceRoot":"","sources":["../../../src/presets/tailwindcss.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAC/B,MAAM,CAAC;IACN,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"tailwindcss.js","sourceRoot":"","sources":["../../../src/presets/tailwindcss.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAC/B,MAAM,CAAC;IACN,IAAI,EAAE,0DAA0D;IAChE,KAAK,EAAE,CAAC,sCAAsC,CAAC;IAC/C,OAAO,EAAE;QACR,WAAW,EAAE,WAAW;KACxB;IACD,QAAQ,EAAE;QACT,WAAW,EAAE;YACZ,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC;SAC9E;KACD;IACD,KAAK,EAAE;QACN,gDAAgD,EAAE,OAAO;QACzD,gCAAgC,EAAE,OAAO;QACzC,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,wCAAwC,EAAE,OAAO;QACjD,4CAA4C,EAAE,OAAO;KACrD;CACD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@touchspot/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "TOUCHSPOT ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prettier": "@touchspot/prettier-config",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@eslint/js": "^9.13.0",
|
|
33
|
-
"@next/eslint-plugin-next": "^15.0.
|
|
33
|
+
"@next/eslint-plugin-next": "^15.0.1",
|
|
34
34
|
"@typescript-eslint/utils": "^8.11.0",
|
|
35
35
|
"eslint-config-prettier": "^9.1.0",
|
|
36
36
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"eslint-plugin-import-x": "^4.3.1",
|
|
40
40
|
"eslint-plugin-no-relative-import-paths": "^1.5.5",
|
|
41
41
|
"eslint-plugin-perfectionist": "^3.9.1",
|
|
42
|
-
"eslint-plugin-react": "^7.37.
|
|
42
|
+
"eslint-plugin-react": "^7.37.2",
|
|
43
|
+
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
|
|
43
44
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
44
45
|
"eslint-plugin-tailwindcss": "^3.17.5",
|
|
45
46
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
@@ -68,9 +69,10 @@
|
|
|
68
69
|
"inquirer": "^9.3.7",
|
|
69
70
|
"knip": "^5.33.3",
|
|
70
71
|
"lint-staged": "^15.2.10",
|
|
71
|
-
"next": "^15.0.
|
|
72
|
+
"next": "^15.0.1",
|
|
72
73
|
"prettier": "^3.3.3",
|
|
73
|
-
"react": "19.0.0-rc-
|
|
74
|
+
"react": "19.0.0-rc-69d4b800-20241021",
|
|
75
|
+
"react-dom": "19.0.0-rc-69d4b800-20241021",
|
|
74
76
|
"tailwindcss": "^3.4.14",
|
|
75
77
|
"ts-patch": "^3.2.1",
|
|
76
78
|
"turbo": "^2.2.3",
|
|
@@ -80,7 +82,8 @@
|
|
|
80
82
|
"peerDependencies": {
|
|
81
83
|
"eslint": "^9",
|
|
82
84
|
"next": "^15",
|
|
83
|
-
"react": "19.0.0-rc
|
|
85
|
+
"react": "^19.0.0-rc",
|
|
86
|
+
"react-dom": "^19.0.0-rc",
|
|
84
87
|
"tailwindcss": "^3"
|
|
85
88
|
},
|
|
86
89
|
"peerDependenciesMeta": {
|