@liberfi.io/eslint-config 0.1.256 → 0.1.258

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/index.mjs +22 -3
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @liberfi.io/eslint-config
2
2
 
3
+ ## 0.1.258
4
+
5
+ ### Patch Changes
6
+
7
+ - publish
8
+
9
+ ## 0.1.257
10
+
11
+ ### Patch Changes
12
+
13
+ - publish
14
+
3
15
  ## 0.1.256
4
16
 
5
17
  ### Patch Changes
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import stylistic from "@stylistic/eslint-plugin";
2
2
  import eslintConfigPrettier from "eslint-config-prettier/flat";
3
- // import importPlugin from "eslint-plugin-import";
3
+ import importPlugin from "eslint-plugin-import";
4
4
  import monorepoCop from "eslint-plugin-monorepo-cop";
5
5
  import reactPlugin from "eslint-plugin-react";
6
6
  import * as reactHooks from "eslint-plugin-react-hooks";
@@ -40,6 +40,7 @@ export default defineConfig([
40
40
  ecmaFeatures: {
41
41
  jsx: true,
42
42
  },
43
+ projectService: true,
43
44
  },
44
45
  globals: {
45
46
  ...globals.browser,
@@ -105,6 +106,7 @@ export default defineConfig([
105
106
  plugins: {
106
107
  // https://eslint.style/packages/default
107
108
  "@stylistic": stylistic,
109
+ import: importPlugin,
108
110
  "monorepo-cop": monorepoCop,
109
111
  "react-hooks": reactHooks,
110
112
  "react-refresh": reactRefresh,
@@ -122,6 +124,7 @@ export default defineConfig([
122
124
  "@typescript-eslint/no-unnecessary-type-constraint": "warn",
123
125
  "@typescript-eslint/no-empty-object-type": "warn",
124
126
  "@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
127
+ "@typescript-eslint/no-floating-promises": "warn",
125
128
  "@typescript-eslint/no-namespace": "off",
126
129
  "@typescript-eslint/ban-ts-comment": "off",
127
130
  "react/prop-types": "off",
@@ -136,8 +139,8 @@ export default defineConfig([
136
139
 
137
140
  // https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks#flat-config-eslintconfigjsts-1
138
141
  "react-hooks/rules-of-hooks": "warn",
139
- // it cause too many false positives, use eslint-plugin-react-hooks-configurable won't solve the problem either
140
- // "react-hooks/exhaustive-deps": "warn",
142
+ "react-hooks/exhaustive-deps": "warn",
143
+ "import/no-duplicates": "warn",
141
144
 
142
145
  // https://github.com/ArnaudBarre/eslint-plugin-react-refresh?tab=readme-ov-file#without-config
143
146
  "react-refresh/only-export-components": "off",
@@ -147,6 +150,22 @@ export default defineConfig([
147
150
  // ],
148
151
  },
149
152
  },
153
+ {
154
+ files: [
155
+ "**/*.test.{ts,tsx}",
156
+ "**/*.spec.{ts,tsx}",
157
+ "**/__tests__/**/*.{ts,tsx}",
158
+ "**/*.config.{ts,tsx}",
159
+ ],
160
+ languageOptions: {
161
+ parserOptions: {
162
+ projectService: false,
163
+ },
164
+ },
165
+ rules: {
166
+ "@typescript-eslint/no-floating-promises": "off",
167
+ },
168
+ },
150
169
 
151
170
  eslintConfigPrettier,
152
171
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liberfi.io/eslint-config",
3
- "version": "0.1.256",
3
+ "version": "0.1.258",
4
4
  "main": "index.mjs",
5
5
  "module": "index.mjs",
6
6
  "license": "MIT",