@aiou/eslint-config 1.0.2 → 1.0.4
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 +26 -18
- package/dist/index.mjs +26 -18
- package/dts/globs.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,7 +20,7 @@ var pluginReact = require('eslint-plugin-react');
|
|
|
20
20
|
var pluginReactHooks = require('eslint-plugin-react-hooks');
|
|
21
21
|
var pluginReactRefresh = require('eslint-plugin-react-refresh');
|
|
22
22
|
var pluginSSRFriendly = require('eslint-plugin-ssr-friendly');
|
|
23
|
-
var
|
|
23
|
+
var node_module = require('node:module');
|
|
24
24
|
var pluginTypeScript = require('@typescript-eslint/eslint-plugin');
|
|
25
25
|
var tsParser = require('@typescript-eslint/parser');
|
|
26
26
|
var pluginETC = require('eslint-plugin-etc');
|
|
@@ -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,8 +149,8 @@ const imports = () => {
|
|
|
161
149
|
{
|
|
162
150
|
files: [
|
|
163
151
|
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
164
|
-
`**/pages/**/*.${GLOB_SCRIPT_EXT}`,
|
|
165
|
-
"**/{
|
|
152
|
+
`**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
|
|
153
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts",
|
|
166
154
|
GLOB_DTS
|
|
167
155
|
],
|
|
168
156
|
rules: {
|
|
@@ -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
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts"
|
|
176
|
+
],
|
|
177
|
+
rules: {
|
|
178
|
+
"import/no-extraneous-dependencies": "off"
|
|
179
|
+
}
|
|
174
180
|
}
|
|
175
181
|
];
|
|
176
182
|
return config;
|
|
@@ -4052,7 +4058,9 @@ const react = () => {
|
|
|
4052
4058
|
return config;
|
|
4053
4059
|
};
|
|
4054
4060
|
|
|
4061
|
+
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
4055
4062
|
const tailwindcss = () => {
|
|
4063
|
+
const pluginTailwindcss = require$1("eslint-plugin-tailwindcss");
|
|
4056
4064
|
const config = [
|
|
4057
4065
|
{
|
|
4058
4066
|
plugins: {
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import pluginReact from 'eslint-plugin-react';
|
|
|
18
18
|
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
19
19
|
import pluginReactRefresh from 'eslint-plugin-react-refresh';
|
|
20
20
|
import pluginSSRFriendly from 'eslint-plugin-ssr-friendly';
|
|
21
|
-
import
|
|
21
|
+
import { createRequire } from 'node:module';
|
|
22
22
|
import pluginTypeScript from '@typescript-eslint/eslint-plugin';
|
|
23
23
|
import tsParser from '@typescript-eslint/parser';
|
|
24
24
|
import pluginETC from 'eslint-plugin-etc';
|
|
@@ -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,8 +147,8 @@ const imports = () => {
|
|
|
159
147
|
{
|
|
160
148
|
files: [
|
|
161
149
|
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
162
|
-
`**/pages/**/*.${GLOB_SCRIPT_EXT}`,
|
|
163
|
-
"**/{
|
|
150
|
+
`**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
|
|
151
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts",
|
|
164
152
|
GLOB_DTS
|
|
165
153
|
],
|
|
166
154
|
rules: {
|
|
@@ -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
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts"
|
|
174
|
+
],
|
|
175
|
+
rules: {
|
|
176
|
+
"import/no-extraneous-dependencies": "off"
|
|
177
|
+
}
|
|
172
178
|
}
|
|
173
179
|
];
|
|
174
180
|
return config;
|
|
@@ -4050,7 +4056,9 @@ const react = () => {
|
|
|
4050
4056
|
return config;
|
|
4051
4057
|
};
|
|
4052
4058
|
|
|
4059
|
+
const require = createRequire(import.meta.url);
|
|
4053
4060
|
const tailwindcss = () => {
|
|
4061
|
+
const pluginTailwindcss = require("eslint-plugin-tailwindcss");
|
|
4054
4062
|
const config = [
|
|
4055
4063
|
{
|
|
4056
4064
|
plugins: {
|
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";
|