@telepix-lab/eslint-config 0.0.1
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/index.mjs +72 -0
- package/package.json +23 -0
package/index.mjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
3
|
+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
|
4
|
+
import eslintPluginReact from "eslint-plugin-react";
|
|
5
|
+
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
|
|
6
|
+
import eslintPluginReactRefresh from "eslint-plugin-react-refresh";
|
|
7
|
+
import eslintPluginTailwindcss from "eslint-plugin-tailwindcss";
|
|
8
|
+
import tseslint from "typescript-eslint";
|
|
9
|
+
|
|
10
|
+
export default tseslint.config(
|
|
11
|
+
eslint.configs.recommended,
|
|
12
|
+
|
|
13
|
+
// typescript config
|
|
14
|
+
tseslint.configs.strictTypeChecked,
|
|
15
|
+
tseslint.configs.stylisticTypeChecked,
|
|
16
|
+
{
|
|
17
|
+
languageOptions: {
|
|
18
|
+
parserOptions: {
|
|
19
|
+
projectService: true,
|
|
20
|
+
tsconfigRootDir: import.meta.dirname,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
// prettier config
|
|
26
|
+
eslintPluginPrettierRecommended,
|
|
27
|
+
eslintConfigPrettier,
|
|
28
|
+
{
|
|
29
|
+
rules: {
|
|
30
|
+
/* prettier 설정 경고 처리 */
|
|
31
|
+
"prettier/prettier": "warn",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// tailwindcss config
|
|
36
|
+
eslintPluginTailwindcss.configs["flat/recommended"],
|
|
37
|
+
{
|
|
38
|
+
rules: {
|
|
39
|
+
"tailwindcss/no-custom-classname": "warn",
|
|
40
|
+
"tailwindcss/enforces-shorthand": "warn",
|
|
41
|
+
"tailwindcss/classnames-order": "warn",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
// react config
|
|
46
|
+
eslintPluginReact.configs.flat.recommended,
|
|
47
|
+
eslintPluginReactRefresh.configs.recommended,
|
|
48
|
+
{
|
|
49
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
50
|
+
plugins: {
|
|
51
|
+
"react-hooks": eslintPluginReactHooks,
|
|
52
|
+
},
|
|
53
|
+
rules: {
|
|
54
|
+
"react/react-in-jsx-scope": "off",
|
|
55
|
+
...eslintPluginReactHooks.configs.recommended.rules,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// default ignore config
|
|
60
|
+
{
|
|
61
|
+
ignores: [
|
|
62
|
+
"dist/**",
|
|
63
|
+
"node_modules/**",
|
|
64
|
+
"build/**",
|
|
65
|
+
"coverage/**",
|
|
66
|
+
"**/*.test.ts",
|
|
67
|
+
"**/*.test.tsx",
|
|
68
|
+
"eslint.config.mjs",
|
|
69
|
+
"example/**",
|
|
70
|
+
],
|
|
71
|
+
}
|
|
72
|
+
);
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telepix-lab/eslint-config",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "TelePIX ESLint config for eslint 9+",
|
|
5
|
+
"main": "index.mjs",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"eslint": ">= 9"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@eslint/js": "^9.20.0",
|
|
12
|
+
"@typescript-eslint/parser": "^8.24.1",
|
|
13
|
+
"eslint-config-prettier": "^10.0.1",
|
|
14
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
15
|
+
"eslint-plugin-react": "^7.37.4",
|
|
16
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
17
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
18
|
+
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
19
|
+
"globals": "^15.14.0",
|
|
20
|
+
"typescript": "^5.7.3",
|
|
21
|
+
"typescript-eslint": "^8.24.1"
|
|
22
|
+
}
|
|
23
|
+
}
|