@aiou/eslint-config 1.0.3 → 1.0.5
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 +13 -6
- package/dist/index.mjs +13 -6
- 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');
|
|
@@ -111,7 +111,7 @@ const imports = () => {
|
|
|
111
111
|
"import/no-unresolved": "off",
|
|
112
112
|
"import/no-absolute-path": "off",
|
|
113
113
|
// Not allowed import devDependencies
|
|
114
|
-
"import/no-extraneous-dependencies": "error",
|
|
114
|
+
"import/no-extraneous-dependencies": ["error", { devDependencies: false }],
|
|
115
115
|
// Not allow import { default as named }
|
|
116
116
|
"import/no-named-default": "warn",
|
|
117
117
|
"unused-imports/no-unused-imports": "error",
|
|
@@ -150,7 +150,7 @@ const imports = () => {
|
|
|
150
150
|
files: [
|
|
151
151
|
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
152
152
|
`**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
|
|
153
|
-
"**/{
|
|
153
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts",
|
|
154
154
|
GLOB_DTS
|
|
155
155
|
],
|
|
156
156
|
rules: {
|
|
@@ -172,7 +172,7 @@ const imports = () => {
|
|
|
172
172
|
// ignore require third packages in .eslintrc.* e.g. eslint-define-config
|
|
173
173
|
`**/.eslintrc.${GLOB_SCRIPT_EXT}`,
|
|
174
174
|
`**/**/eslint.config.${GLOB_SCRIPT_EXT}`,
|
|
175
|
-
"**/{
|
|
175
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts"
|
|
176
176
|
],
|
|
177
177
|
rules: {
|
|
178
178
|
"import/no-extraneous-dependencies": "off"
|
|
@@ -4058,7 +4058,9 @@ const react = () => {
|
|
|
4058
4058
|
return config;
|
|
4059
4059
|
};
|
|
4060
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)));
|
|
4061
4062
|
const tailwindcss = () => {
|
|
4063
|
+
const pluginTailwindcss = require$1("eslint-plugin-tailwindcss");
|
|
4062
4064
|
const config = [
|
|
4063
4065
|
{
|
|
4064
4066
|
plugins: {
|
|
@@ -4172,8 +4174,13 @@ const typescript = () => {
|
|
|
4172
4174
|
* 1. https://ncjamieson.com/dont-export-const-enums/
|
|
4173
4175
|
* 2. https://www.huy.rocks/everyday/02-24-2022-typescript-enums-at-runtime-and-tree-shaking
|
|
4174
4176
|
*/
|
|
4175
|
-
"
|
|
4176
|
-
|
|
4177
|
+
"no-restricted-syntax": [
|
|
4178
|
+
"error",
|
|
4179
|
+
{
|
|
4180
|
+
selector: "TSEnumDeclaration",
|
|
4181
|
+
message: "Don't declare enums"
|
|
4182
|
+
}
|
|
4183
|
+
],
|
|
4177
4184
|
// required tsconfig.json
|
|
4178
4185
|
// 'etc/no-misused-generics': 'error',
|
|
4179
4186
|
// Overrides JS
|
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';
|
|
@@ -109,7 +109,7 @@ const imports = () => {
|
|
|
109
109
|
"import/no-unresolved": "off",
|
|
110
110
|
"import/no-absolute-path": "off",
|
|
111
111
|
// Not allowed import devDependencies
|
|
112
|
-
"import/no-extraneous-dependencies": "error",
|
|
112
|
+
"import/no-extraneous-dependencies": ["error", { devDependencies: false }],
|
|
113
113
|
// Not allow import { default as named }
|
|
114
114
|
"import/no-named-default": "warn",
|
|
115
115
|
"unused-imports/no-unused-imports": "error",
|
|
@@ -148,7 +148,7 @@ const imports = () => {
|
|
|
148
148
|
files: [
|
|
149
149
|
`**/*config*.${GLOB_SCRIPT_EXT}`,
|
|
150
150
|
`**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
|
|
151
|
-
"**/{
|
|
151
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts",
|
|
152
152
|
GLOB_DTS
|
|
153
153
|
],
|
|
154
154
|
rules: {
|
|
@@ -170,7 +170,7 @@ const imports = () => {
|
|
|
170
170
|
// ignore require third packages in .eslintrc.* e.g. eslint-define-config
|
|
171
171
|
`**/.eslintrc.${GLOB_SCRIPT_EXT}`,
|
|
172
172
|
`**/**/eslint.config.${GLOB_SCRIPT_EXT}`,
|
|
173
|
-
"**/{
|
|
173
|
+
"**/{vite,esbuild,rollup,webpack,rspack}.ts"
|
|
174
174
|
],
|
|
175
175
|
rules: {
|
|
176
176
|
"import/no-extraneous-dependencies": "off"
|
|
@@ -4056,7 +4056,9 @@ const react = () => {
|
|
|
4056
4056
|
return config;
|
|
4057
4057
|
};
|
|
4058
4058
|
|
|
4059
|
+
const require = createRequire(import.meta.url);
|
|
4059
4060
|
const tailwindcss = () => {
|
|
4061
|
+
const pluginTailwindcss = require("eslint-plugin-tailwindcss");
|
|
4060
4062
|
const config = [
|
|
4061
4063
|
{
|
|
4062
4064
|
plugins: {
|
|
@@ -4170,8 +4172,13 @@ const typescript = () => {
|
|
|
4170
4172
|
* 1. https://ncjamieson.com/dont-export-const-enums/
|
|
4171
4173
|
* 2. https://www.huy.rocks/everyday/02-24-2022-typescript-enums-at-runtime-and-tree-shaking
|
|
4172
4174
|
*/
|
|
4173
|
-
"
|
|
4174
|
-
|
|
4175
|
+
"no-restricted-syntax": [
|
|
4176
|
+
"error",
|
|
4177
|
+
{
|
|
4178
|
+
selector: "TSEnumDeclaration",
|
|
4179
|
+
message: "Don't declare enums"
|
|
4180
|
+
}
|
|
4181
|
+
],
|
|
4175
4182
|
// required tsconfig.json
|
|
4176
4183
|
// 'etc/no-misused-generics': 'error',
|
|
4177
4184
|
// Overrides JS
|