@10stars/config 13.0.7 → 13.0.9
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/eslint.config.ts +10 -2
- package/package.json +1 -1
package/eslint.config.ts
CHANGED
|
@@ -103,15 +103,23 @@ const addPluginReact = () =>
|
|
|
103
103
|
|
|
104
104
|
const addPluginImport = () =>
|
|
105
105
|
[
|
|
106
|
-
importPlugin.flatConfigs.
|
|
106
|
+
importPlugin.flatConfigs.recommended,
|
|
107
|
+
{
|
|
108
|
+
files: ["**/*.{ts,tsx}"], // https://github.com/import-js/eslint-plugin-import/tree/4f145a2c64af4931f4bf3ae951c8b719b544718f?tab=readme-ov-file#config---flat-with-config-in-typescript-eslint
|
|
109
|
+
extends: [
|
|
110
|
+
importPlugin.flatConfigs.recommended,
|
|
111
|
+
importPlugin.flatConfigs.typescript,
|
|
112
|
+
],
|
|
113
|
+
},
|
|
107
114
|
{
|
|
108
115
|
rules: {
|
|
109
116
|
"import/order": 0,
|
|
110
117
|
"import/no-unresolved": 0,
|
|
118
|
+
"import/namespace": 0, // we use "import * as x" and then use "x" (ex. Object.keys(x))
|
|
111
119
|
"import/no-duplicates": 1,
|
|
112
120
|
"import/no-named-as-default": 0,
|
|
113
121
|
"import/no-nodejs-modules": [
|
|
114
|
-
2,
|
|
122
|
+
2, // to enforce importing with "node:" prefix
|
|
115
123
|
{
|
|
116
124
|
allow: builtinModules
|
|
117
125
|
.filter((v) => !v.startsWith(`_`))
|