@shelf/eslint-config 4.2.0 → 4.2.1
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/frontend-typescript.js +7 -9
- package/package.json +1 -1
package/frontend-typescript.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import node from "eslint-plugin-node";
|
|
2
2
|
import testingLibrary from "eslint-plugin-testing-library";
|
|
3
|
-
import {
|
|
3
|
+
import {fixupPluginRules} from '@eslint/compat';
|
|
4
4
|
import tsParser from "@typescript-eslint/parser";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -20,18 +20,16 @@ const compat = new FlatCompat({
|
|
|
20
20
|
recommendedConfig: js.configs.recommended,
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
const testingLibraryReact = {
|
|
24
|
+
rules: compat.extends("plugin:testing-library/react")[0].rules,
|
|
25
|
+
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)']
|
|
26
|
+
};
|
|
27
|
+
|
|
23
28
|
export default [...compat.extends(
|
|
24
29
|
"plugin:you-dont-need-lodash-underscore/compatible",
|
|
25
30
|
), ...tsEslint.configs.recommended,
|
|
26
31
|
...frontendConfig,
|
|
27
|
-
|
|
28
|
-
compat.config({
|
|
29
|
-
overrides: [{
|
|
30
|
-
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
31
|
-
extends: ['plugin:testing-library/react'],
|
|
32
|
-
}]
|
|
33
|
-
}),
|
|
34
|
-
),
|
|
32
|
+
testingLibraryReact,
|
|
35
33
|
{
|
|
36
34
|
plugins: {
|
|
37
35
|
'@typescript-eslint': tsEslint.plugin,
|