@telepix-lab/eslint-config 0.0.6 → 0.0.7
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/cjs/index.js +54 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +54 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/index.js +0 -88
- package/dist/index.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -7,15 +7,18 @@ var eslintPluginReact = require('eslint-plugin-react');
|
|
|
7
7
|
var eslintPluginReactHooks = require('eslint-plugin-react-hooks');
|
|
8
8
|
var eslintPluginReactRefresh = require('eslint-plugin-react-refresh');
|
|
9
9
|
var eslintPluginTailwindcss = require('eslint-plugin-tailwindcss');
|
|
10
|
+
var globals = require('globals');
|
|
10
11
|
var tseslint = require('typescript-eslint');
|
|
11
12
|
|
|
12
13
|
var index = tseslint.config(
|
|
13
14
|
eslint.configs.recommended,
|
|
14
15
|
|
|
15
|
-
// typescript config
|
|
16
|
-
tseslint.configs.strictTypeChecked,
|
|
17
|
-
tseslint.configs.stylisticTypeChecked,
|
|
18
16
|
{
|
|
17
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
18
|
+
extends: [
|
|
19
|
+
...tseslint.configs.strictTypeChecked,
|
|
20
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
21
|
+
],
|
|
19
22
|
languageOptions: {
|
|
20
23
|
parserOptions: {
|
|
21
24
|
projectService: true,
|
|
@@ -35,7 +38,7 @@ var index = tseslint.config(
|
|
|
35
38
|
},
|
|
36
39
|
|
|
37
40
|
// tailwindcss config
|
|
38
|
-
eslintPluginTailwindcss.configs["flat/recommended"],
|
|
41
|
+
...eslintPluginTailwindcss.configs["flat/recommended"],
|
|
39
42
|
{
|
|
40
43
|
rules: {
|
|
41
44
|
"tailwindcss/no-custom-classname": "warn",
|
|
@@ -46,6 +49,7 @@ var index = tseslint.config(
|
|
|
46
49
|
|
|
47
50
|
// react config
|
|
48
51
|
eslintPluginReact.configs.flat.recommended,
|
|
52
|
+
eslintPluginReact.configs.flat["jsx-runtime"],
|
|
49
53
|
eslintPluginReactRefresh.configs.recommended,
|
|
50
54
|
{
|
|
51
55
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
@@ -56,6 +60,52 @@ var index = tseslint.config(
|
|
|
56
60
|
"react/react-in-jsx-scope": "off",
|
|
57
61
|
...eslintPluginReactHooks.configs.recommended.rules,
|
|
58
62
|
},
|
|
63
|
+
languageOptions: {
|
|
64
|
+
globals: {
|
|
65
|
+
...globals.browser,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
settings: {
|
|
69
|
+
react: {
|
|
70
|
+
createClass: "createReactClass", // Regex for Component Factory to use,
|
|
71
|
+
// default to "createReactClass"
|
|
72
|
+
pragma: "React", // Pragma to use, default to "React"
|
|
73
|
+
fragment: "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
|
|
74
|
+
version: "detect", // React version. "detect" automatically picks the version you have installed.
|
|
75
|
+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
|
|
76
|
+
// Defaults to the "defaultVersion" setting and warns if missing, and to "detect" in the future
|
|
77
|
+
defaultVersion: "", // Default React version to use when the version you have installed cannot be detected.
|
|
78
|
+
// If not provided, defaults to the latest React version.
|
|
79
|
+
flowVersion: "0.53", // Flow version
|
|
80
|
+
},
|
|
81
|
+
propWrapperFunctions: [
|
|
82
|
+
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
|
|
83
|
+
"forbidExtraProps",
|
|
84
|
+
{ property: "freeze", object: "Object" },
|
|
85
|
+
{ property: "myFavoriteWrapper" },
|
|
86
|
+
// for rules that check exact prop wrappers
|
|
87
|
+
{ property: "forbidExtraProps", exact: true },
|
|
88
|
+
],
|
|
89
|
+
componentWrapperFunctions: [
|
|
90
|
+
// The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.
|
|
91
|
+
"observer", // `property`
|
|
92
|
+
{ property: "styled" }, // `object` is optional
|
|
93
|
+
{ property: "observer", object: "Mobx" },
|
|
94
|
+
{ property: "observer", object: "<pragma>" }, // sets `object` to whatever value `settings.react.pragma` is set to
|
|
95
|
+
],
|
|
96
|
+
formComponents: [
|
|
97
|
+
// Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />
|
|
98
|
+
"CustomForm",
|
|
99
|
+
{ name: "SimpleForm", formAttribute: "endpoint" },
|
|
100
|
+
{ name: "Form", formAttribute: ["registerEndpoint", "loginEndpoint"] }, // allows specifying multiple properties if necessary
|
|
101
|
+
],
|
|
102
|
+
linkComponents: [
|
|
103
|
+
// Components used as alternatives to <a> for linking, eg. <Link to={ url } />
|
|
104
|
+
"Hyperlink",
|
|
105
|
+
{ name: "MyLink", linkAttribute: "to" },
|
|
106
|
+
{ name: "Link", linkAttribute: ["to", "href"] }, // allows specifying multiple properties if necessary
|
|
107
|
+
],
|
|
108
|
+
},
|
|
59
109
|
},
|
|
60
110
|
|
|
61
111
|
// default ignore config
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../index.mjs"],"sourcesContent":["import eslint from \"@eslint/js\";\nimport eslintConfigPrettier from \"eslint-config-prettier\";\nimport eslintPluginPrettierRecommended from \"eslint-plugin-prettier/recommended\";\nimport eslintPluginReact from \"eslint-plugin-react\";\nimport eslintPluginReactHooks from \"eslint-plugin-react-hooks\";\nimport eslintPluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport eslintPluginTailwindcss from \"eslint-plugin-tailwindcss\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../index.mjs"],"sourcesContent":["import eslint from \"@eslint/js\";\nimport eslintConfigPrettier from \"eslint-config-prettier\";\nimport eslintPluginPrettierRecommended from \"eslint-plugin-prettier/recommended\";\nimport eslintPluginReact from \"eslint-plugin-react\";\nimport eslintPluginReactHooks from \"eslint-plugin-react-hooks\";\nimport eslintPluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport eslintPluginTailwindcss from \"eslint-plugin-tailwindcss\";\nimport globals from \"globals\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n\n {\n files: [\"**/*.ts\", \"**/*.tsx\"],\n extends: [\n ...tseslint.configs.strictTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n ],\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: import.meta.dirname,\n },\n },\n },\n\n // prettier config\n eslintPluginPrettierRecommended,\n eslintConfigPrettier,\n {\n rules: {\n /* prettier 설정 경고 처리 */\n \"prettier/prettier\": \"warn\",\n },\n },\n\n // tailwindcss config\n ...eslintPluginTailwindcss.configs[\"flat/recommended\"],\n {\n rules: {\n \"tailwindcss/no-custom-classname\": \"warn\",\n \"tailwindcss/enforces-shorthand\": \"warn\",\n \"tailwindcss/classnames-order\": \"warn\",\n },\n },\n\n // react config\n eslintPluginReact.configs.flat.recommended,\n eslintPluginReact.configs.flat[\"jsx-runtime\"],\n eslintPluginReactRefresh.configs.recommended,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n plugins: {\n \"react-hooks\": eslintPluginReactHooks,\n },\n rules: {\n \"react/react-in-jsx-scope\": \"off\",\n ...eslintPluginReactHooks.configs.recommended.rules,\n },\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n },\n settings: {\n react: {\n createClass: \"createReactClass\", // Regex for Component Factory to use,\n // default to \"createReactClass\"\n pragma: \"React\", // Pragma to use, default to \"React\"\n fragment: \"Fragment\", // Fragment to use (may be a property of <pragma>), default to \"Fragment\"\n version: \"detect\", // React version. \"detect\" automatically picks the version you have installed.\n // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.\n // Defaults to the \"defaultVersion\" setting and warns if missing, and to \"detect\" in the future\n defaultVersion: \"\", // Default React version to use when the version you have installed cannot be detected.\n // If not provided, defaults to the latest React version.\n flowVersion: \"0.53\", // Flow version\n },\n propWrapperFunctions: [\n // The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.\n \"forbidExtraProps\",\n { property: \"freeze\", object: \"Object\" },\n { property: \"myFavoriteWrapper\" },\n // for rules that check exact prop wrappers\n { property: \"forbidExtraProps\", exact: true },\n ],\n componentWrapperFunctions: [\n // The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.\n \"observer\", // `property`\n { property: \"styled\" }, // `object` is optional\n { property: \"observer\", object: \"Mobx\" },\n { property: \"observer\", object: \"<pragma>\" }, // sets `object` to whatever value `settings.react.pragma` is set to\n ],\n formComponents: [\n // Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />\n \"CustomForm\",\n { name: \"SimpleForm\", formAttribute: \"endpoint\" },\n { name: \"Form\", formAttribute: [\"registerEndpoint\", \"loginEndpoint\"] }, // allows specifying multiple properties if necessary\n ],\n linkComponents: [\n // Components used as alternatives to <a> for linking, eg. <Link to={ url } />\n \"Hyperlink\",\n { name: \"MyLink\", linkAttribute: \"to\" },\n { name: \"Link\", linkAttribute: [\"to\", \"href\"] }, // allows specifying multiple properties if necessary\n ],\n },\n },\n\n // default ignore config\n {\n ignores: [\n \"dist/**\",\n \"node_modules/**\",\n \"build/**\",\n \"coverage/**\",\n \"**/*.test.ts\",\n \"**/*.test.tsx\",\n \"eslint.config.mjs\",\n \"example/**\",\n ],\n }\n);\n"],"names":[],"mappings":";;;;;;;;;;;;AAUA,YAAe,QAAQ,CAAC,MAAM;AAC9B,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;;AAE5B,EAAE;AACF,IAAI,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AAClC,IAAI,OAAO,EAAE;AACb,MAAM,GAAG,QAAQ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MAAM,UAAU;AAChB,MAAM,aAAa;AACnB,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,mBAAmB;AACzB,MAAM,YAAY;AAClB,KAAK;AACL;AACA,CAAC;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -5,15 +5,18 @@ import eslintPluginReact from 'eslint-plugin-react';
|
|
|
5
5
|
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
|
|
6
6
|
import eslintPluginReactRefresh from 'eslint-plugin-react-refresh';
|
|
7
7
|
import eslintPluginTailwindcss from 'eslint-plugin-tailwindcss';
|
|
8
|
+
import globals from 'globals';
|
|
8
9
|
import tseslint from 'typescript-eslint';
|
|
9
10
|
|
|
10
11
|
var index = tseslint.config(
|
|
11
12
|
eslint.configs.recommended,
|
|
12
13
|
|
|
13
|
-
// typescript config
|
|
14
|
-
tseslint.configs.strictTypeChecked,
|
|
15
|
-
tseslint.configs.stylisticTypeChecked,
|
|
16
14
|
{
|
|
15
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
16
|
+
extends: [
|
|
17
|
+
...tseslint.configs.strictTypeChecked,
|
|
18
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
19
|
+
],
|
|
17
20
|
languageOptions: {
|
|
18
21
|
parserOptions: {
|
|
19
22
|
projectService: true,
|
|
@@ -33,7 +36,7 @@ var index = tseslint.config(
|
|
|
33
36
|
},
|
|
34
37
|
|
|
35
38
|
// tailwindcss config
|
|
36
|
-
eslintPluginTailwindcss.configs["flat/recommended"],
|
|
39
|
+
...eslintPluginTailwindcss.configs["flat/recommended"],
|
|
37
40
|
{
|
|
38
41
|
rules: {
|
|
39
42
|
"tailwindcss/no-custom-classname": "warn",
|
|
@@ -44,6 +47,7 @@ var index = tseslint.config(
|
|
|
44
47
|
|
|
45
48
|
// react config
|
|
46
49
|
eslintPluginReact.configs.flat.recommended,
|
|
50
|
+
eslintPluginReact.configs.flat["jsx-runtime"],
|
|
47
51
|
eslintPluginReactRefresh.configs.recommended,
|
|
48
52
|
{
|
|
49
53
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
@@ -54,6 +58,52 @@ var index = tseslint.config(
|
|
|
54
58
|
"react/react-in-jsx-scope": "off",
|
|
55
59
|
...eslintPluginReactHooks.configs.recommended.rules,
|
|
56
60
|
},
|
|
61
|
+
languageOptions: {
|
|
62
|
+
globals: {
|
|
63
|
+
...globals.browser,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
settings: {
|
|
67
|
+
react: {
|
|
68
|
+
createClass: "createReactClass", // Regex for Component Factory to use,
|
|
69
|
+
// default to "createReactClass"
|
|
70
|
+
pragma: "React", // Pragma to use, default to "React"
|
|
71
|
+
fragment: "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
|
|
72
|
+
version: "detect", // React version. "detect" automatically picks the version you have installed.
|
|
73
|
+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
|
|
74
|
+
// Defaults to the "defaultVersion" setting and warns if missing, and to "detect" in the future
|
|
75
|
+
defaultVersion: "", // Default React version to use when the version you have installed cannot be detected.
|
|
76
|
+
// If not provided, defaults to the latest React version.
|
|
77
|
+
flowVersion: "0.53", // Flow version
|
|
78
|
+
},
|
|
79
|
+
propWrapperFunctions: [
|
|
80
|
+
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
|
|
81
|
+
"forbidExtraProps",
|
|
82
|
+
{ property: "freeze", object: "Object" },
|
|
83
|
+
{ property: "myFavoriteWrapper" },
|
|
84
|
+
// for rules that check exact prop wrappers
|
|
85
|
+
{ property: "forbidExtraProps", exact: true },
|
|
86
|
+
],
|
|
87
|
+
componentWrapperFunctions: [
|
|
88
|
+
// The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.
|
|
89
|
+
"observer", // `property`
|
|
90
|
+
{ property: "styled" }, // `object` is optional
|
|
91
|
+
{ property: "observer", object: "Mobx" },
|
|
92
|
+
{ property: "observer", object: "<pragma>" }, // sets `object` to whatever value `settings.react.pragma` is set to
|
|
93
|
+
],
|
|
94
|
+
formComponents: [
|
|
95
|
+
// Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />
|
|
96
|
+
"CustomForm",
|
|
97
|
+
{ name: "SimpleForm", formAttribute: "endpoint" },
|
|
98
|
+
{ name: "Form", formAttribute: ["registerEndpoint", "loginEndpoint"] }, // allows specifying multiple properties if necessary
|
|
99
|
+
],
|
|
100
|
+
linkComponents: [
|
|
101
|
+
// Components used as alternatives to <a> for linking, eg. <Link to={ url } />
|
|
102
|
+
"Hyperlink",
|
|
103
|
+
{ name: "MyLink", linkAttribute: "to" },
|
|
104
|
+
{ name: "Link", linkAttribute: ["to", "href"] }, // allows specifying multiple properties if necessary
|
|
105
|
+
],
|
|
106
|
+
},
|
|
57
107
|
},
|
|
58
108
|
|
|
59
109
|
// default ignore config
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../index.mjs"],"sourcesContent":["import eslint from \"@eslint/js\";\nimport eslintConfigPrettier from \"eslint-config-prettier\";\nimport eslintPluginPrettierRecommended from \"eslint-plugin-prettier/recommended\";\nimport eslintPluginReact from \"eslint-plugin-react\";\nimport eslintPluginReactHooks from \"eslint-plugin-react-hooks\";\nimport eslintPluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport eslintPluginTailwindcss from \"eslint-plugin-tailwindcss\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../index.mjs"],"sourcesContent":["import eslint from \"@eslint/js\";\nimport eslintConfigPrettier from \"eslint-config-prettier\";\nimport eslintPluginPrettierRecommended from \"eslint-plugin-prettier/recommended\";\nimport eslintPluginReact from \"eslint-plugin-react\";\nimport eslintPluginReactHooks from \"eslint-plugin-react-hooks\";\nimport eslintPluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport eslintPluginTailwindcss from \"eslint-plugin-tailwindcss\";\nimport globals from \"globals\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n\n {\n files: [\"**/*.ts\", \"**/*.tsx\"],\n extends: [\n ...tseslint.configs.strictTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n ],\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: import.meta.dirname,\n },\n },\n },\n\n // prettier config\n eslintPluginPrettierRecommended,\n eslintConfigPrettier,\n {\n rules: {\n /* prettier 설정 경고 처리 */\n \"prettier/prettier\": \"warn\",\n },\n },\n\n // tailwindcss config\n ...eslintPluginTailwindcss.configs[\"flat/recommended\"],\n {\n rules: {\n \"tailwindcss/no-custom-classname\": \"warn\",\n \"tailwindcss/enforces-shorthand\": \"warn\",\n \"tailwindcss/classnames-order\": \"warn\",\n },\n },\n\n // react config\n eslintPluginReact.configs.flat.recommended,\n eslintPluginReact.configs.flat[\"jsx-runtime\"],\n eslintPluginReactRefresh.configs.recommended,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n plugins: {\n \"react-hooks\": eslintPluginReactHooks,\n },\n rules: {\n \"react/react-in-jsx-scope\": \"off\",\n ...eslintPluginReactHooks.configs.recommended.rules,\n },\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n },\n settings: {\n react: {\n createClass: \"createReactClass\", // Regex for Component Factory to use,\n // default to \"createReactClass\"\n pragma: \"React\", // Pragma to use, default to \"React\"\n fragment: \"Fragment\", // Fragment to use (may be a property of <pragma>), default to \"Fragment\"\n version: \"detect\", // React version. \"detect\" automatically picks the version you have installed.\n // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.\n // Defaults to the \"defaultVersion\" setting and warns if missing, and to \"detect\" in the future\n defaultVersion: \"\", // Default React version to use when the version you have installed cannot be detected.\n // If not provided, defaults to the latest React version.\n flowVersion: \"0.53\", // Flow version\n },\n propWrapperFunctions: [\n // The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.\n \"forbidExtraProps\",\n { property: \"freeze\", object: \"Object\" },\n { property: \"myFavoriteWrapper\" },\n // for rules that check exact prop wrappers\n { property: \"forbidExtraProps\", exact: true },\n ],\n componentWrapperFunctions: [\n // The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.\n \"observer\", // `property`\n { property: \"styled\" }, // `object` is optional\n { property: \"observer\", object: \"Mobx\" },\n { property: \"observer\", object: \"<pragma>\" }, // sets `object` to whatever value `settings.react.pragma` is set to\n ],\n formComponents: [\n // Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />\n \"CustomForm\",\n { name: \"SimpleForm\", formAttribute: \"endpoint\" },\n { name: \"Form\", formAttribute: [\"registerEndpoint\", \"loginEndpoint\"] }, // allows specifying multiple properties if necessary\n ],\n linkComponents: [\n // Components used as alternatives to <a> for linking, eg. <Link to={ url } />\n \"Hyperlink\",\n { name: \"MyLink\", linkAttribute: \"to\" },\n { name: \"Link\", linkAttribute: [\"to\", \"href\"] }, // allows specifying multiple properties if necessary\n ],\n },\n },\n\n // default ignore config\n {\n ignores: [\n \"dist/**\",\n \"node_modules/**\",\n \"build/**\",\n \"coverage/**\",\n \"**/*.test.ts\",\n \"**/*.test.tsx\",\n \"eslint.config.mjs\",\n \"example/**\",\n ],\n }\n);\n"],"names":[],"mappings":";;;;;;;;;;AAUA,YAAe,QAAQ,CAAC,MAAM;AAC9B,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;;AAE5B,EAAE;AACF,IAAI,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AAClC,IAAI,OAAO,EAAE;AACb,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB;AAC3C,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,oBAAoB;AAC9C,KAAK;AACL,IAAI,eAAe,EAAE;AACrB,MA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;AAClB,KAAK;AACL;AACA,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telepix-lab/eslint-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Telepix ESLint configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
39
39
|
"eslint-plugin-react-refresh": "^0.4.0",
|
|
40
40
|
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
41
|
-
"
|
|
41
|
+
"globals": "^15.14.0",
|
|
42
|
+
"typescript-eslint": "^8.22.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@rollup/plugin-commonjs": "^25.0.0",
|
package/dist/index.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var eslint = require('@eslint/js');
|
|
4
|
-
var eslintConfigPrettier = require('eslint-config-prettier');
|
|
5
|
-
var eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
|
|
6
|
-
var eslintPluginReact = require('eslint-plugin-react');
|
|
7
|
-
var eslintPluginReactHooks = require('eslint-plugin-react-hooks');
|
|
8
|
-
var eslintPluginReactRefresh = require('eslint-plugin-react-refresh');
|
|
9
|
-
var eslintPluginTailwindcss = require('eslint-plugin-tailwindcss');
|
|
10
|
-
var tseslint = require('typescript-eslint');
|
|
11
|
-
|
|
12
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
|
|
14
|
-
var eslint__default = /*#__PURE__*/_interopDefault(eslint);
|
|
15
|
-
var eslintConfigPrettier__default = /*#__PURE__*/_interopDefault(eslintConfigPrettier);
|
|
16
|
-
var eslintPluginPrettierRecommended__default = /*#__PURE__*/_interopDefault(eslintPluginPrettierRecommended);
|
|
17
|
-
var eslintPluginReact__default = /*#__PURE__*/_interopDefault(eslintPluginReact);
|
|
18
|
-
var eslintPluginReactHooks__default = /*#__PURE__*/_interopDefault(eslintPluginReactHooks);
|
|
19
|
-
var eslintPluginReactRefresh__default = /*#__PURE__*/_interopDefault(eslintPluginReactRefresh);
|
|
20
|
-
var eslintPluginTailwindcss__default = /*#__PURE__*/_interopDefault(eslintPluginTailwindcss);
|
|
21
|
-
var tseslint__default = /*#__PURE__*/_interopDefault(tseslint);
|
|
22
|
-
|
|
23
|
-
var index = tseslint__default.default.config(
|
|
24
|
-
eslint__default.default.configs.recommended,
|
|
25
|
-
|
|
26
|
-
// typescript config
|
|
27
|
-
tseslint__default.default.configs.strictTypeChecked,
|
|
28
|
-
tseslint__default.default.configs.stylisticTypeChecked,
|
|
29
|
-
{
|
|
30
|
-
languageOptions: {
|
|
31
|
-
parserOptions: {
|
|
32
|
-
projectService: true,
|
|
33
|
-
tsconfigRootDir: undefined,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
// prettier config
|
|
39
|
-
eslintPluginPrettierRecommended__default.default,
|
|
40
|
-
eslintConfigPrettier__default.default,
|
|
41
|
-
{
|
|
42
|
-
rules: {
|
|
43
|
-
/* prettier 설정 경고 처리 */
|
|
44
|
-
"prettier/prettier": "warn",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
// tailwindcss config
|
|
49
|
-
eslintPluginTailwindcss__default.default.configs["flat/recommended"],
|
|
50
|
-
{
|
|
51
|
-
rules: {
|
|
52
|
-
"tailwindcss/no-custom-classname": "warn",
|
|
53
|
-
"tailwindcss/enforces-shorthand": "warn",
|
|
54
|
-
"tailwindcss/classnames-order": "warn",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
// react config
|
|
59
|
-
eslintPluginReact__default.default.configs.flat.recommended,
|
|
60
|
-
eslintPluginReactRefresh__default.default.configs.recommended,
|
|
61
|
-
{
|
|
62
|
-
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
63
|
-
plugins: {
|
|
64
|
-
"react-hooks": eslintPluginReactHooks__default.default,
|
|
65
|
-
},
|
|
66
|
-
rules: {
|
|
67
|
-
"react/react-in-jsx-scope": "off",
|
|
68
|
-
...eslintPluginReactHooks__default.default.configs.recommended.rules,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
// default ignore config
|
|
73
|
-
{
|
|
74
|
-
ignores: [
|
|
75
|
-
"dist/**",
|
|
76
|
-
"node_modules/**",
|
|
77
|
-
"build/**",
|
|
78
|
-
"coverage/**",
|
|
79
|
-
"**/*.test.ts",
|
|
80
|
-
"**/*.test.tsx",
|
|
81
|
-
"eslint.config.mjs",
|
|
82
|
-
"example/**",
|
|
83
|
-
],
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
module.exports = index;
|
|
88
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../index.mjs"],"sourcesContent":["import eslint from \"@eslint/js\";\nimport eslintConfigPrettier from \"eslint-config-prettier\";\nimport eslintPluginPrettierRecommended from \"eslint-plugin-prettier/recommended\";\nimport eslintPluginReact from \"eslint-plugin-react\";\nimport eslintPluginReactHooks from \"eslint-plugin-react-hooks\";\nimport eslintPluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport eslintPluginTailwindcss from \"eslint-plugin-tailwindcss\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n\n // typescript config\n tseslint.configs.strictTypeChecked,\n tseslint.configs.stylisticTypeChecked,\n {\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: import.meta.dirname,\n },\n },\n },\n\n // prettier config\n eslintPluginPrettierRecommended,\n eslintConfigPrettier,\n {\n rules: {\n /* prettier 설정 경고 처리 */\n \"prettier/prettier\": \"warn\",\n },\n },\n\n // tailwindcss config\n eslintPluginTailwindcss.configs[\"flat/recommended\"],\n {\n rules: {\n \"tailwindcss/no-custom-classname\": \"warn\",\n \"tailwindcss/enforces-shorthand\": \"warn\",\n \"tailwindcss/classnames-order\": \"warn\",\n },\n },\n\n // react config\n eslintPluginReact.configs.flat.recommended,\n eslintPluginReactRefresh.configs.recommended,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n plugins: {\n \"react-hooks\": eslintPluginReactHooks,\n },\n rules: {\n \"react/react-in-jsx-scope\": \"off\",\n ...eslintPluginReactHooks.configs.recommended.rules,\n },\n },\n\n // default ignore config\n {\n ignores: [\n \"dist/**\",\n \"node_modules/**\",\n \"build/**\",\n \"coverage/**\",\n \"**/*.test.ts\",\n \"**/*.test.tsx\",\n \"eslint.config.mjs\",\n \"example/**\",\n ],\n }\n);\n"],"names":["tseslint","eslint","eslintPluginPrettierRecommended","eslintConfigPrettier","eslintPluginTailwindcss","eslintPluginReact","eslintPluginReactRefresh","eslintPluginReactHooks"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AASA,YAAeA,yBAAQ,CAAC,MAAM;AAC9B,EAAEC,uBAAM,CAAC,OAAO,CAAC,WAAW;;AAE5B;AACA,EAAED,yBAAQ,CAAC,OAAO,CAAC,iBAAiB;AACpC,EAAEA,yBAAQ,CAAC,OAAO,CAAC,oBAAoB;AACvC,EAAE;AACF,IAAI,eAAe,EAAE;AACrB,MAAM,aAAa,EAAE;AACrB,QAAQ,cAAc,EAAE,IAAI;AAC5B,QAAQ,eAAe,EAAE,SAAmB;AAC5C,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA,EAAEE,gDAA+B;AACjC,EAAEC,qCAAoB;AACtB,EAAE;AACF,IAAI,KAAK,EAAE;AACX;AACA,MAAM,mBAAmB,EAAE,MAAM;AACjC,KAAK;AACL,GAAG;;AAEH;AACA,EAAEC,wCAAu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