@aiou/eslint-config 1.0.2 → 1.0.3
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/index.cjs +22 -16
- package/dist/index.mjs +22 -16
- package/dts/globs.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -54,7 +54,7 @@ const ignores = () => {
|
|
|
54
54
|
|
|
55
55
|
const GLOB_SCRIPT_EXT = "?([cm])[jt]s?(x)";
|
|
56
56
|
const GLOB_TEST_SCRIPT = "**/*.{spec,test}.?([cm])[jt]s?(x)";
|
|
57
|
-
const GLOB_TEST_DIRS = "**/{test,tests,__test__,__tests__}/**";
|
|
57
|
+
const GLOB_TEST_DIRS = "**/{test,tests,e2e,__test__,__tests__}/**";
|
|
58
58
|
const GLOB_DTS = "**/*.d.ts";
|
|
59
59
|
const GLOB_TS = "**/*.?([cm])ts";
|
|
60
60
|
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
@@ -110,20 +110,8 @@ const imports = () => {
|
|
|
110
110
|
"import/no-mutable-exports": "error",
|
|
111
111
|
"import/no-unresolved": "off",
|
|
112
112
|
"import/no-absolute-path": "off",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
devDependencies: [
|
|
117
|
-
// ignore dev scripts
|
|
118
|
-
"**/scripts/**/*.{js,jsx,ts,tsx,cjs,mjs}",
|
|
119
|
-
"**/*.test.{js,jsx,ts,tsx,cjs,mjs}",
|
|
120
|
-
"**/*.spec.{js,jsx,ts,tsx,mjs,cjs}",
|
|
121
|
-
"**/*.config.{js,jsx,ts,tsx,cjs,mjs}",
|
|
122
|
-
// ignore require third packages in .eslintrc.* e.g. eslint-define-config
|
|
123
|
-
"**/.eslintrc.{js,cjs,mjs}"
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
],
|
|
113
|
+
// Not allowed import devDependencies
|
|
114
|
+
"import/no-extraneous-dependencies": "error",
|
|
127
115
|
// Not allow import { default as named }
|
|
128
116
|
"import/no-named-default": "warn",
|
|
129
117
|
"unused-imports/no-unused-imports": "error",
|
|
@@ -161,7 +149,7 @@ const imports = () => {
|
|
|
161
149
|
{
|
|
162
150
|
files: [
|
|
163
151
|
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
164
|
-
`**/pages/**/*.${GLOB_SCRIPT_EXT}`,
|
|
152
|
+
`**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
|
|
165
153
|
"**/{index,vite,esbuild,rollup,webpack,rspack}.ts",
|
|
166
154
|
GLOB_DTS
|
|
167
155
|
],
|
|
@@ -171,6 +159,24 @@ const imports = () => {
|
|
|
171
159
|
"import/no-anonymous-default-export": "off",
|
|
172
160
|
"import/no-default-export": "off"
|
|
173
161
|
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
files: [
|
|
165
|
+
// ignore devDependencies on scripts files
|
|
166
|
+
`**/script?(s)/**/*.${GLOB_SCRIPT_EXT}`,
|
|
167
|
+
`**/**/script?(s).${GLOB_SCRIPT_EXT}`,
|
|
168
|
+
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
169
|
+
// ignore devDependencies on test files
|
|
170
|
+
GLOB_TEST_SCRIPT,
|
|
171
|
+
GLOB_TEST_DIRS,
|
|
172
|
+
// ignore require third packages in .eslintrc.* e.g. eslint-define-config
|
|
173
|
+
`**/.eslintrc.${GLOB_SCRIPT_EXT}`,
|
|
174
|
+
`**/**/eslint.config.${GLOB_SCRIPT_EXT}`,
|
|
175
|
+
"**/{index,vite,esbuild,rollup,webpack,rspack}.ts"
|
|
176
|
+
],
|
|
177
|
+
rules: {
|
|
178
|
+
"import/no-extraneous-dependencies": "off"
|
|
179
|
+
}
|
|
174
180
|
}
|
|
175
181
|
];
|
|
176
182
|
return config;
|
package/dist/index.mjs
CHANGED
|
@@ -52,7 +52,7 @@ const ignores = () => {
|
|
|
52
52
|
|
|
53
53
|
const GLOB_SCRIPT_EXT = "?([cm])[jt]s?(x)";
|
|
54
54
|
const GLOB_TEST_SCRIPT = "**/*.{spec,test}.?([cm])[jt]s?(x)";
|
|
55
|
-
const GLOB_TEST_DIRS = "**/{test,tests,__test__,__tests__}/**";
|
|
55
|
+
const GLOB_TEST_DIRS = "**/{test,tests,e2e,__test__,__tests__}/**";
|
|
56
56
|
const GLOB_DTS = "**/*.d.ts";
|
|
57
57
|
const GLOB_TS = "**/*.?([cm])ts";
|
|
58
58
|
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
@@ -108,20 +108,8 @@ const imports = () => {
|
|
|
108
108
|
"import/no-mutable-exports": "error",
|
|
109
109
|
"import/no-unresolved": "off",
|
|
110
110
|
"import/no-absolute-path": "off",
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
devDependencies: [
|
|
115
|
-
// ignore dev scripts
|
|
116
|
-
"**/scripts/**/*.{js,jsx,ts,tsx,cjs,mjs}",
|
|
117
|
-
"**/*.test.{js,jsx,ts,tsx,cjs,mjs}",
|
|
118
|
-
"**/*.spec.{js,jsx,ts,tsx,mjs,cjs}",
|
|
119
|
-
"**/*.config.{js,jsx,ts,tsx,cjs,mjs}",
|
|
120
|
-
// ignore require third packages in .eslintrc.* e.g. eslint-define-config
|
|
121
|
-
"**/.eslintrc.{js,cjs,mjs}"
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
],
|
|
111
|
+
// Not allowed import devDependencies
|
|
112
|
+
"import/no-extraneous-dependencies": "error",
|
|
125
113
|
// Not allow import { default as named }
|
|
126
114
|
"import/no-named-default": "warn",
|
|
127
115
|
"unused-imports/no-unused-imports": "error",
|
|
@@ -159,7 +147,7 @@ const imports = () => {
|
|
|
159
147
|
{
|
|
160
148
|
files: [
|
|
161
149
|
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
162
|
-
`**/pages/**/*.${GLOB_SCRIPT_EXT}`,
|
|
150
|
+
`**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
|
|
163
151
|
"**/{index,vite,esbuild,rollup,webpack,rspack}.ts",
|
|
164
152
|
GLOB_DTS
|
|
165
153
|
],
|
|
@@ -169,6 +157,24 @@ const imports = () => {
|
|
|
169
157
|
"import/no-anonymous-default-export": "off",
|
|
170
158
|
"import/no-default-export": "off"
|
|
171
159
|
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
files: [
|
|
163
|
+
// ignore devDependencies on scripts files
|
|
164
|
+
`**/script?(s)/**/*.${GLOB_SCRIPT_EXT}`,
|
|
165
|
+
`**/**/script?(s).${GLOB_SCRIPT_EXT}`,
|
|
166
|
+
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
167
|
+
// ignore devDependencies on test files
|
|
168
|
+
GLOB_TEST_SCRIPT,
|
|
169
|
+
GLOB_TEST_DIRS,
|
|
170
|
+
// ignore require third packages in .eslintrc.* e.g. eslint-define-config
|
|
171
|
+
`**/.eslintrc.${GLOB_SCRIPT_EXT}`,
|
|
172
|
+
`**/**/eslint.config.${GLOB_SCRIPT_EXT}`,
|
|
173
|
+
"**/{index,vite,esbuild,rollup,webpack,rspack}.ts"
|
|
174
|
+
],
|
|
175
|
+
rules: {
|
|
176
|
+
"import/no-extraneous-dependencies": "off"
|
|
177
|
+
}
|
|
172
178
|
}
|
|
173
179
|
];
|
|
174
180
|
return config;
|
package/dts/globs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const GLOB_SCRIPT_EXT = "?([cm])[jt]s?(x)";
|
|
2
2
|
export declare const GLOB_TEST_SCRIPT = "**/*.{spec,test}.?([cm])[jt]s?(x)";
|
|
3
|
-
export declare const GLOB_TEST_DIRS = "**/{test,tests,__test__,__tests__}/**";
|
|
3
|
+
export declare const GLOB_TEST_DIRS = "**/{test,tests,e2e,__test__,__tests__}/**";
|
|
4
4
|
export declare const GLOB_DTS = "**/*.d.ts";
|
|
5
5
|
export declare const GLOB_TS = "**/*.?([cm])ts";
|
|
6
6
|
export declare const GLOB_TSX = "**/*.?([cm])tsx";
|