@touchspot/eslint-config 1.0.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/lib/lib.d.ts +4 -0
- package/dist/lib/lib.d.ts.map +1 -0
- package/dist/lib/lib.js +4 -0
- package/dist/lib/lib.js.map +1 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +37 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/env.d.ts +7 -0
- package/dist/src/env.d.ts.map +1 -0
- package/dist/src/env.js +21 -0
- package/dist/src/env.js.map +1 -0
- package/dist/src/frameworks.d.ts +4 -0
- package/dist/src/frameworks.d.ts.map +1 -0
- package/dist/src/frameworks.js +131 -0
- package/dist/src/frameworks.js.map +1 -0
- package/dist/src/languages.d.ts +3 -0
- package/dist/src/languages.d.ts.map +1 -0
- package/dist/src/languages.js +246 -0
- package/dist/src/languages.js.map +1 -0
- package/package.json +110 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,yBAAuB;AACzC,OAAO,KAAK,GAAG,sBAAoB;AACnC,OAAO,KAAK,UAAU,6BAA2B"}
|
package/dist/lib/lib.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../lib/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,yBAAuB,CAAC,iDAAiD;AAC3F,OAAO,KAAK,GAAG,sBAAoB;AACnC,OAAO,KAAK,UAAU,6BAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,kBAET;IACF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,wEAwCC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import Prettier from "eslint-config-prettier";
|
|
2
|
+
import TSESLint from "typescript-eslint";
|
|
3
|
+
import * as languages from "./languages.js";
|
|
4
|
+
const config = ({ ignores = ["build", "dist"], } = {}) => TSESLint.config({
|
|
5
|
+
name: "@touchspot/eslint-config/config/base",
|
|
6
|
+
ignores: ignores.map((ignore) => `**/${ignore}/**`),
|
|
7
|
+
linterOptions: {
|
|
8
|
+
reportUnusedDisableDirectives: "error",
|
|
9
|
+
},
|
|
10
|
+
}, {
|
|
11
|
+
name: "@touchspot/eslint-config/config/parser",
|
|
12
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parser: TSESLint.parser,
|
|
15
|
+
parserOptions: {
|
|
16
|
+
ecmaVersion: "latest",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
}, {
|
|
20
|
+
name: "@touchspot/eslint-config/config/esm",
|
|
21
|
+
files: ["**/*.{js,jsx,mjs,ts,tsx,mts}"],
|
|
22
|
+
languageOptions: {
|
|
23
|
+
parserOptions: {
|
|
24
|
+
sourceType: "module",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
}, {
|
|
28
|
+
name: "@touchspot/eslint-config/config/cjs",
|
|
29
|
+
files: ["**/*.{cjs,cts}"],
|
|
30
|
+
languageOptions: {
|
|
31
|
+
parserOptions: {
|
|
32
|
+
sourceType: "commonjs",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
}, ...languages.javascript(), ...languages.typescript(), Prettier);
|
|
36
|
+
export default config; // eslint-disable-line import-x/no-default-export
|
|
37
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,GAAG,CAAC,EACf,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAGxB,EAAE,EAAE,EAAE,CACT,QAAQ,CAAC,MAAM,CACd;IACC,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,MAAM,KAAK,CAAC;IACnD,aAAa,EAAE;QACd,6BAA6B,EAAE,OAAO;KACtC;CACD,EACD;IACC,IAAI,EAAE,wCAAwC;IAC9C,KAAK,EAAE,CAAC,sCAAsC,CAAC;IAC/C,eAAe,EAAE;QAChB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,aAAa,EAAE;YACd,WAAW,EAAE,QAAQ;SACrB;KACD;CACD,EACD;IACC,IAAI,EAAE,qCAAqC;IAC3C,KAAK,EAAE,CAAC,8BAA8B,CAAC;IACvC,eAAe,EAAE;QAChB,aAAa,EAAE;YACd,UAAU,EAAE,QAAQ;SACpB;KACD;CACD,EACD;IACC,IAAI,EAAE,qCAAqC;IAC3C,KAAK,EAAE,CAAC,gBAAgB,CAAC;IACzB,eAAe,EAAE;QAChB,aAAa,EAAE;YACd,UAAU,EAAE,UAAU;SACtB;KACD;CACD,EACD,GAAG,SAAS,CAAC,UAAU,EAAE,EACzB,GAAG,SAAS,CAAC,UAAU,EAAE,EACzB,QAAQ,CACR,CAAC;AAEH,eAAe,MAAM,CAAC,CAAC,iDAAiD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const browser: ({ files, }?: {
|
|
2
|
+
readonly files?: readonly string[];
|
|
3
|
+
}) => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
4
|
+
export declare const node: ({ files, }?: {
|
|
5
|
+
readonly files?: readonly string[];
|
|
6
|
+
}) => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
7
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,gBAEjB;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC,wEASE,CAAC;AAEJ,eAAO,MAAM,IAAI,gBAEd;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC,wEASE,CAAC"}
|
package/dist/src/env.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Globals from "globals";
|
|
2
|
+
import TSESLint from "typescript-eslint";
|
|
3
|
+
export const browser = ({ files = ["**/*.{js,jsx,mjs,cjs}", "**/*.{ts,tsx,mts,cts}"], } = {}) => TSESLint.config({
|
|
4
|
+
name: "@touchspot/eslint-config/env/browser",
|
|
5
|
+
files: [...files],
|
|
6
|
+
languageOptions: {
|
|
7
|
+
globals: {
|
|
8
|
+
...Globals.browser,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
export const node = ({ files = ["**/*.{js,jsx,mjs,cjs}", "**/*.{ts,tsx,mts,cts}"], } = {}) => TSESLint.config({
|
|
13
|
+
name: "@touchspot/eslint-config/env/node",
|
|
14
|
+
files: [...files],
|
|
15
|
+
languageOptions: {
|
|
16
|
+
globals: {
|
|
17
|
+
...Globals.node,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACvB,KAAK,GAAG,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,MAGvD,EAAE,EAAE,EAAE,CACT,QAAQ,CAAC,MAAM,CAAC;IACf,IAAI,EAAE,sCAAsC;IAC5C,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC;IACjB,eAAe,EAAE;QAChB,OAAO,EAAE;YACR,GAAG,OAAO,CAAC,OAAO;SAClB;KACD;CACD,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACpB,KAAK,GAAG,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,MAGvD,EAAE,EAAE,EAAE,CACT,QAAQ,CAAC,MAAM,CAAC;IACf,IAAI,EAAE,mCAAmC;IACzC,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC;IACjB,eAAe,EAAE;QAChB,OAAO,EAAE;YACR,GAAG,OAAO,CAAC,IAAI;SACf;KACD;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const react: () => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
|
+
export declare const next: () => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
3
|
+
export declare const tailwindcss: () => import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
4
|
+
//# sourceMappingURL=frameworks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frameworks.d.ts","sourceRoot":"","sources":["../../src/frameworks.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,KAAK,2EAgEhB,CAAC;AAEH,eAAO,MAAM,IAAI,2EA+Cf,CAAC;AAEH,eAAO,MAAM,WAAW,2EAoBrB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import Next from "@next/eslint-plugin-next";
|
|
3
|
+
import CheckFile from "eslint-plugin-check-file";
|
|
4
|
+
import Functional from "eslint-plugin-functional";
|
|
5
|
+
import ImportX from "eslint-plugin-import-x";
|
|
6
|
+
import React from "eslint-plugin-react";
|
|
7
|
+
import ReactHooks from "eslint-plugin-react-hooks";
|
|
8
|
+
import TailwindCSS from "eslint-plugin-tailwindcss";
|
|
9
|
+
import Globals from "globals";
|
|
10
|
+
import TSESLint from "typescript-eslint";
|
|
11
|
+
export const react = () => TSESLint.config({
|
|
12
|
+
name: "@touchspot/eslint-config/frameworks/react/parser",
|
|
13
|
+
files: ["**/*.{js,jsx,tsx}"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
parserOptions: {
|
|
16
|
+
jsxPragma: null,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
}, {
|
|
20
|
+
name: "@touchspot/eslint-config/frameworks/react/functional",
|
|
21
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
22
|
+
plugins: {
|
|
23
|
+
functional: Functional,
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
"functional/immutable-data": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
ignoreImmediateMutation: true,
|
|
30
|
+
ignoreNonConstDeclarations: { treatParametersAsConst: true },
|
|
31
|
+
ignoreAccessorPattern: ["ref.current", "*Ref.current"],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
}, {
|
|
36
|
+
name: "@touchspot/eslint-config/frameworks/react/react",
|
|
37
|
+
files: ["**/*.{js,jsx,tsx}"],
|
|
38
|
+
plugins: {
|
|
39
|
+
react: React,
|
|
40
|
+
},
|
|
41
|
+
settings: {
|
|
42
|
+
react: {
|
|
43
|
+
version: "detect",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
rules: {
|
|
47
|
+
...React.configs.recommended.rules,
|
|
48
|
+
...React.configs["jsx-runtime"].rules,
|
|
49
|
+
"react/button-has-type": "error",
|
|
50
|
+
"react/iframe-missing-sandbox": "error",
|
|
51
|
+
"react/jsx-boolean-value": "error",
|
|
52
|
+
"react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
|
|
53
|
+
"react/jsx-sort-props": [
|
|
54
|
+
"error",
|
|
55
|
+
{ callbacksLast: true, noSortAlphabetically: true, reservedFirst: ["key", "ref"] },
|
|
56
|
+
],
|
|
57
|
+
"react/self-closing-comp": "error",
|
|
58
|
+
},
|
|
59
|
+
}, {
|
|
60
|
+
name: "@touchspot/eslint-config/frameworks/react/react-hooks",
|
|
61
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
62
|
+
plugins: {
|
|
63
|
+
"react-hooks": ReactHooks,
|
|
64
|
+
},
|
|
65
|
+
rules: {
|
|
66
|
+
"react-hooks/rules-of-hooks": "error",
|
|
67
|
+
"react-hooks/exhaustive-deps": "error",
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
export const next = () => TSESLint.config({
|
|
71
|
+
name: "@touchspot/eslint-config/frameworks/next/ignore",
|
|
72
|
+
ignores: [".next/**"],
|
|
73
|
+
}, {
|
|
74
|
+
name: "@touchspot/eslint-config/frameworks/next/parser",
|
|
75
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
76
|
+
extends: [...react()],
|
|
77
|
+
languageOptions: {
|
|
78
|
+
globals: {
|
|
79
|
+
...Globals.node,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
}, {
|
|
83
|
+
name: "@touchspot/eslint-config/frameworks/next/next",
|
|
84
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
85
|
+
plugins: {
|
|
86
|
+
"@next/next": Next,
|
|
87
|
+
},
|
|
88
|
+
rules: {
|
|
89
|
+
...Next.configs.recommended.rules,
|
|
90
|
+
...Next.configs["core-web-vitals"].rules,
|
|
91
|
+
},
|
|
92
|
+
}, {
|
|
93
|
+
name: "@touchspot/eslint-config/frameworks/next/check-file",
|
|
94
|
+
files: ["{src/,}app/**/*.{ts,tsx}"],
|
|
95
|
+
plugins: {
|
|
96
|
+
"check-file": CheckFile,
|
|
97
|
+
},
|
|
98
|
+
rules: {
|
|
99
|
+
"check-file/folder-naming-convention": ["error", { "**": "NEXT_JS_APP_ROUTER_CASE" }],
|
|
100
|
+
},
|
|
101
|
+
}, {
|
|
102
|
+
name: "@touchspot/eslint-config/frameworks/next/import-x",
|
|
103
|
+
files: ["{src/,}app/**/*.{ts,tsx}"],
|
|
104
|
+
plugins: {
|
|
105
|
+
"import-x": ImportX,
|
|
106
|
+
},
|
|
107
|
+
rules: {
|
|
108
|
+
"import-x/no-default-export": "off",
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export const tailwindcss = () => TSESLint.config({
|
|
112
|
+
name: "@touchspot/eslint-config/frameworks/tailwindcss/tailwindcss",
|
|
113
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
114
|
+
plugins: {
|
|
115
|
+
tailwindcss: TailwindCSS,
|
|
116
|
+
},
|
|
117
|
+
settings: {
|
|
118
|
+
tailwindcss: {
|
|
119
|
+
callees: ["classnames", "clsx", "cn", "ctl", "cva", "twJoin", "twMerge", "tv"],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
rules: {
|
|
123
|
+
"tailwindcss/enforces-negative-arbitrary-values": "error",
|
|
124
|
+
"tailwindcss/enforces-shorthand": "error",
|
|
125
|
+
"tailwindcss/migration-from-tailwind-2": "error",
|
|
126
|
+
"tailwindcss/no-custom-classname": "error",
|
|
127
|
+
"tailwindcss/no-contradicting-classname": "error",
|
|
128
|
+
"tailwindcss/no-unnecessary-arbitrary-value": "error",
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=frameworks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frameworks.js","sourceRoot":"","sources":["../../src/frameworks.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ACnC,OAAO,EAAE;QACR,YAAY,EAAE,SAAS;KACvB;IACD,KAAK,EAAE;QACN,qCAAqC,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;KACrF;CACD,EACD;IACC,IAAI,EAAE,mDAAmD;IACzD,KAAK,EAAE,CAAC,0BAA0B,CAAC;IACnC,OAAO,EAAE;QACR,UAAU,EAAE,OAAO;KACnB;IACD,KAAK,EAAE;QACN,4BAA4B,EAAE,KAAK;KACnC;CACD,CACD,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAC/B,QAAQ,CAAC,MAAM,CAAC;IACf,IAAI,EAAE,6DAA6D;IACnE,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/languages.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,2EAkIrB,CAAC;AAEH,eAAO,MAAM,UAAU,2EA2HrB,CAAC"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import ESLint from "@eslint/js";
|
|
2
|
+
import CheckFile from "eslint-plugin-check-file";
|
|
3
|
+
import Functional from "eslint-plugin-functional";
|
|
4
|
+
import ImportX from "eslint-plugin-import-x";
|
|
5
|
+
import NoRelativeImportPaths from "eslint-plugin-no-relative-import-paths";
|
|
6
|
+
import Perfectionist from "eslint-plugin-perfectionist";
|
|
7
|
+
import Unicorn from "eslint-plugin-unicorn";
|
|
8
|
+
import UnusedImports from "eslint-plugin-unused-imports";
|
|
9
|
+
import TSESLint from "typescript-eslint";
|
|
10
|
+
export const javascript = () => TSESLint.config({
|
|
11
|
+
name: "@touchspot/eslint-config/languages/javascript/eslint",
|
|
12
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
13
|
+
extends: [ESLint.configs.recommended],
|
|
14
|
+
rules: {
|
|
15
|
+
"arrow-body-style": ["error"],
|
|
16
|
+
eqeqeq: ["error", "always", { null: "never" }],
|
|
17
|
+
"max-params": "error",
|
|
18
|
+
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
19
|
+
"no-lone-blocks": "error",
|
|
20
|
+
"no-lonely-if": "error",
|
|
21
|
+
"no-loop-func": "error",
|
|
22
|
+
"no-param-reassign": "error",
|
|
23
|
+
"no-restricted-imports": [
|
|
24
|
+
"error",
|
|
25
|
+
{ patterns: [{ group: ["**/_*", "!./_*"], message: "Do not import directory-private module." }] },
|
|
26
|
+
],
|
|
27
|
+
"no-useless-rename": "error",
|
|
28
|
+
"object-shorthand": "error",
|
|
29
|
+
"prefer-destructuring": "error",
|
|
30
|
+
},
|
|
31
|
+
}, {
|
|
32
|
+
name: "@touchspot/eslint-config/languages/javascript/import-x",
|
|
33
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
34
|
+
plugins: {
|
|
35
|
+
"import-x": ImportX,
|
|
36
|
+
},
|
|
37
|
+
settings: {
|
|
38
|
+
"import-x/internal-regex": "^#[^/]+/",
|
|
39
|
+
},
|
|
40
|
+
rules: {
|
|
41
|
+
...ImportX.configs.recommended.rules,
|
|
42
|
+
"import-x/export": "off",
|
|
43
|
+
"import-x/first": "error",
|
|
44
|
+
"import-x/namespace": "off",
|
|
45
|
+
"import-x/newline-after-import": "error",
|
|
46
|
+
"import-x/no-anonymous-default-export": ["error", { allowArray: true, allowObject: true }],
|
|
47
|
+
"import-x/no-duplicates": "error",
|
|
48
|
+
"import-x/no-unresolved": "off",
|
|
49
|
+
"import-x/no-useless-path-segments": "error",
|
|
50
|
+
},
|
|
51
|
+
}, {
|
|
52
|
+
name: "@touchspot/eslint-config/languages/javascript/import-x/cjs",
|
|
53
|
+
files: ["**/*.{cjs,cts}"],
|
|
54
|
+
plugins: {
|
|
55
|
+
"import-x": ImportX,
|
|
56
|
+
},
|
|
57
|
+
rules: {
|
|
58
|
+
"import-x/no-import-module-exports": "error",
|
|
59
|
+
},
|
|
60
|
+
}, {
|
|
61
|
+
name: "@touchspot/eslint-config/languages/javascript/perfectionist",
|
|
62
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
63
|
+
plugins: {
|
|
64
|
+
perfectionist: Perfectionist,
|
|
65
|
+
},
|
|
66
|
+
rules: {
|
|
67
|
+
"perfectionist/sort-exports": ["error", { type: "natural" }],
|
|
68
|
+
"perfectionist/sort-imports": [
|
|
69
|
+
"error",
|
|
70
|
+
{
|
|
71
|
+
type: "natural",
|
|
72
|
+
internalPattern: ["#*/**"],
|
|
73
|
+
groups: [
|
|
74
|
+
"side-effect",
|
|
75
|
+
"builtin",
|
|
76
|
+
"external",
|
|
77
|
+
"internal",
|
|
78
|
+
["parent", "sibling", "index"],
|
|
79
|
+
"object",
|
|
80
|
+
"unknown",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
"perfectionist/sort-named-exports": ["error", { type: "natural" }],
|
|
85
|
+
"perfectionist/sort-named-imports": ["error", { type: "natural" }],
|
|
86
|
+
},
|
|
87
|
+
}, {
|
|
88
|
+
name: "@touchspot/eslint-config/languages/javascript/unicorn",
|
|
89
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
90
|
+
extends: [Unicorn.configs["flat/recommended"]],
|
|
91
|
+
rules: {
|
|
92
|
+
"unicorn/filename-case": "off",
|
|
93
|
+
"unicorn/no-array-callback-reference": "off",
|
|
94
|
+
"unicorn/no-array-reduce": "off",
|
|
95
|
+
"unicorn/no-null": "off",
|
|
96
|
+
"unicorn/prefer-object-from-entries": "off",
|
|
97
|
+
"unicorn/prevent-abbreviations": "off",
|
|
98
|
+
},
|
|
99
|
+
}, {
|
|
100
|
+
name: "@touchspot/eslint-config/languages/javascript/unicorn/cjs",
|
|
101
|
+
files: ["**/*.{cjs,cts}"],
|
|
102
|
+
rules: {
|
|
103
|
+
"unicorn/prefer-module": "off",
|
|
104
|
+
},
|
|
105
|
+
}, {
|
|
106
|
+
name: "@touchspot/eslint-config/languages/javascript/unused-imports",
|
|
107
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
108
|
+
plugins: {
|
|
109
|
+
"unused-imports": UnusedImports,
|
|
110
|
+
},
|
|
111
|
+
rules: {
|
|
112
|
+
"no-unused-vars": "off",
|
|
113
|
+
"unused-imports/no-unused-imports": "error",
|
|
114
|
+
"unused-imports/no-unused-vars": [
|
|
115
|
+
"error",
|
|
116
|
+
{ args: "after-used", argsIgnorePattern: "^_", vars: "all", varsIgnorePattern: "^_" },
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
}, {
|
|
120
|
+
name: "@touchspot/eslint-config/languages/javascript/check-file",
|
|
121
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
122
|
+
ignores: ["**/*.d.*"],
|
|
123
|
+
plugins: {
|
|
124
|
+
"check-file": CheckFile,
|
|
125
|
+
},
|
|
126
|
+
rules: {
|
|
127
|
+
"check-file/folder-naming-convention": ["error", { "**": "KEBAB_CASE" }],
|
|
128
|
+
"check-file/filename-naming-convention": ["error", { "**": "KEBAB_CASE" }, { ignoreMiddleExtensions: true }],
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
export const typescript = () => TSESLint.config({
|
|
132
|
+
name: "@touchspot/eslint-config/languages/typescript/parser",
|
|
133
|
+
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
134
|
+
languageOptions: {
|
|
135
|
+
parserOptions: {
|
|
136
|
+
projectService: true,
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
}, {
|
|
140
|
+
name: "@touchspot/eslint-config/languages/typescript/typescript-eslint",
|
|
141
|
+
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
142
|
+
extends: [...TSESLint.configs.strictTypeChecked, ...TSESLint.configs.stylisticTypeChecked],
|
|
143
|
+
rules: {
|
|
144
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
145
|
+
"@typescript-eslint/consistent-type-exports": "error",
|
|
146
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
147
|
+
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: "no-public" }],
|
|
148
|
+
"@typescript-eslint/naming-convention": [
|
|
149
|
+
"error",
|
|
150
|
+
{
|
|
151
|
+
selector: "default",
|
|
152
|
+
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
153
|
+
leadingUnderscore: "forbid",
|
|
154
|
+
trailingUnderscore: "forbid",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
selector: ["parameter", "variable"],
|
|
158
|
+
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
159
|
+
leadingUnderscore: "allow",
|
|
160
|
+
trailingUnderscore: "forbid",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
selector: "typeLike",
|
|
164
|
+
format: ["PascalCase", "UPPER_CASE"],
|
|
165
|
+
leadingUnderscore: "forbid",
|
|
166
|
+
trailingUnderscore: "forbid",
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
selector: "default",
|
|
170
|
+
modifiers: ["requiresQuotes"],
|
|
171
|
+
format: null,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
selector: "property",
|
|
175
|
+
filter: {
|
|
176
|
+
regex: "^(_tag|__typename)$",
|
|
177
|
+
match: true,
|
|
178
|
+
},
|
|
179
|
+
format: null,
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
183
|
+
"no-shadow": "off",
|
|
184
|
+
"@typescript-eslint/no-shadow": ["error", { allow: ["_"] }],
|
|
185
|
+
"@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }],
|
|
186
|
+
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
187
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
188
|
+
"@typescript-eslint/no-useless-empty-export": "error",
|
|
189
|
+
"@typescript-eslint/parameter-properties": "error",
|
|
190
|
+
"@typescript-eslint/prefer-readonly": "error",
|
|
191
|
+
"@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
|
|
192
|
+
"@typescript-eslint/return-await": ["error", "always"],
|
|
193
|
+
"@typescript-eslint/strict-boolean-expressions": [
|
|
194
|
+
"error",
|
|
195
|
+
{ allowString: false, allowNumber: false, allowNullableObject: false },
|
|
196
|
+
],
|
|
197
|
+
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
198
|
+
},
|
|
199
|
+
}, {
|
|
200
|
+
name: "@touchspot/eslint-config/languages/typescript/functional",
|
|
201
|
+
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
202
|
+
plugins: {
|
|
203
|
+
functional: Functional,
|
|
204
|
+
},
|
|
205
|
+
rules: {
|
|
206
|
+
"functional/immutable-data": [
|
|
207
|
+
"error",
|
|
208
|
+
{
|
|
209
|
+
ignoreImmediateMutation: true,
|
|
210
|
+
ignoreNonConstDeclarations: { treatParametersAsConst: true },
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
"functional/prefer-property-signatures": "error",
|
|
214
|
+
"functional/prefer-readonly-type": "error",
|
|
215
|
+
},
|
|
216
|
+
}, {
|
|
217
|
+
name: "@touchspot/eslint-config/languages/typescript/import-x",
|
|
218
|
+
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
219
|
+
plugins: {
|
|
220
|
+
"import-x": ImportX,
|
|
221
|
+
},
|
|
222
|
+
rules: {
|
|
223
|
+
...ImportX.configs.typescript.rules,
|
|
224
|
+
"import-x/consistent-type-specifier-style": "error",
|
|
225
|
+
},
|
|
226
|
+
}, {
|
|
227
|
+
name: "@touchspot/eslint-config/languages/typescript/import-x",
|
|
228
|
+
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
229
|
+
ignores: ["**/*.d.*"],
|
|
230
|
+
plugins: {
|
|
231
|
+
"import-x": ImportX,
|
|
232
|
+
},
|
|
233
|
+
rules: {
|
|
234
|
+
"import-x/no-default-export": "error",
|
|
235
|
+
},
|
|
236
|
+
}, {
|
|
237
|
+
name: "@touchspot/eslint-config/languages/typescript/no-relative-import-paths",
|
|
238
|
+
files: ["**/*.{ts,tsx,mts,cts}"],
|
|
239
|
+
plugins: {
|
|
240
|
+
"no-relative-import-paths": NoRelativeImportPaths,
|
|
241
|
+
},
|
|
242
|
+
rules: {
|
|
243
|
+
"no-relative-import-paths/no-relative-import-paths": ["error", { allowSameFolder: true }],
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/languages.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,YAAY,CAAC;AAChC,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAC7C,OAAO,qBAAqB,MAAM,wCAAwC,CAAC;AAC3E,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,aAAa,MAAM,8BAA8B,CAAC;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,wEAAwE;IAC9E,KAAK,EAAE,CAAC,uBAAuB,CAAC;IAChC,OAAO,EAAE;QACR,0BAA0B,EAAE,qBAAqB;KACjD;IACD,KAAK,EAAE;QACN,mDAAmD,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;KACzF;CACD,CACD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@touchspot/eslint-config",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TOUCHSPOT ESLint config",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"typescript"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/touchspot/eslint-config/tree/main",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/touchspot/eslint-config/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/touchspot/eslint-config.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "mozisan <mozisan@users.noreply.github.com>",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/lib/lib.d.ts",
|
|
23
|
+
"import": "./dist/lib/lib.js"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"package.json",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@eslint/js": "^9.9.1",
|
|
34
|
+
"@next/eslint-plugin-next": "canary",
|
|
35
|
+
"eslint-config-prettier": "^9.1.0",
|
|
36
|
+
"eslint-plugin-check-file": "^2.8.0",
|
|
37
|
+
"eslint-plugin-functional": "^7.0.2",
|
|
38
|
+
"eslint-plugin-import-x": "^4.0.0",
|
|
39
|
+
"eslint-plugin-no-relative-import-paths": "^1.5.5",
|
|
40
|
+
"eslint-plugin-perfectionist": "^3.2.0",
|
|
41
|
+
"eslint-plugin-react": "^7.35.0",
|
|
42
|
+
"eslint-plugin-react-hooks": "next",
|
|
43
|
+
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
44
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
45
|
+
"eslint-plugin-unused-imports": "^4.1.3",
|
|
46
|
+
"globals": "^15.9.0",
|
|
47
|
+
"typescript-eslint": "^8.3.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@commitlint/cli": "^19.4.0",
|
|
51
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
52
|
+
"@commitlint/config-pnpm-scopes": "^19.1.0",
|
|
53
|
+
"@commitlint/cz-commitlint": "^19.4.0",
|
|
54
|
+
"@eslint/config-inspector": "^0.5.4",
|
|
55
|
+
"@touchspot/prettier-config": "^1.0.0",
|
|
56
|
+
"@tsconfig/next": "^2.0.3",
|
|
57
|
+
"@tsconfig/node20": "^20.1.4",
|
|
58
|
+
"@tsconfig/strictest": "^2.0.5",
|
|
59
|
+
"@types/eslint-config-prettier": "^6.11.3",
|
|
60
|
+
"@types/eslint__js": "^8.42.3",
|
|
61
|
+
"@types/node": "^22.5.0",
|
|
62
|
+
"@types/react": "^18.3.4",
|
|
63
|
+
"@typescript-eslint/utils": "^8.3.0",
|
|
64
|
+
"better-typescript-lib": "^2.8.0",
|
|
65
|
+
"commitizen": "^4.3.0",
|
|
66
|
+
"eslint": "^9.9.1",
|
|
67
|
+
"husky": "^9.1.5",
|
|
68
|
+
"inquirer": "^9.3.6",
|
|
69
|
+
"knip": "^5.27.4",
|
|
70
|
+
"lint-staged": "^15.2.9",
|
|
71
|
+
"next": "^14.2.6",
|
|
72
|
+
"prettier": "^3.3.3",
|
|
73
|
+
"react": "^18.3.1",
|
|
74
|
+
"tailwindcss": "^3.4.10",
|
|
75
|
+
"ts-patch": "^3.2.1",
|
|
76
|
+
"turbo": "^2.0.14",
|
|
77
|
+
"typescript": "^5.5.4",
|
|
78
|
+
"typescript-transform-paths": "^3.5.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"eslint": "^9",
|
|
82
|
+
"next": "^14.2.6",
|
|
83
|
+
"react": "^18.3.1",
|
|
84
|
+
"tailwindcss": "^3.4.10"
|
|
85
|
+
},
|
|
86
|
+
"peerDependenciesMeta": {
|
|
87
|
+
"next": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"react": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"tailwindcss": {
|
|
94
|
+
"optional": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"publishConfig": {
|
|
98
|
+
"access": "public"
|
|
99
|
+
},
|
|
100
|
+
"scripts": {
|
|
101
|
+
"build": "tspc --project tsconfig.build.json",
|
|
102
|
+
"check:format": "prettier --check .",
|
|
103
|
+
"check:lint": "eslint .",
|
|
104
|
+
"check:type": "tsc --noEmit",
|
|
105
|
+
"check:unused": "knip",
|
|
106
|
+
"fix:format": "prettier --write --log-level=warn .",
|
|
107
|
+
"fix:lint": "eslint --fix .",
|
|
108
|
+
"inspect": "config-inspector"
|
|
109
|
+
}
|
|
110
|
+
}
|