@shelf/eslint-config 4.2.0 → 4.3.0

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/README.md CHANGED
@@ -62,43 +62,11 @@ export default [
62
62
  ];
63
63
  ```
64
64
 
65
- #### Vue `eslint.config.js`
66
-
67
- ```js
68
- import feVueConfig from '@shelf/eslint-config/frontend-vue';
69
-
70
- export default [
71
- ...feVueConfig,
72
- {
73
- rules: {
74
- "no-unused-vars": ["error", {"vars": "all", "argsIgnorePattern": "^h$"}]
75
- }
76
- }
77
- ];
78
- ```
79
-
80
- #### Typescript with Vue `eslint.config.js`
81
-
82
- ```js
83
- import feTsVueConfig from '@shelf/eslint-config/frontend-typescript-vue';
84
-
85
- export default [
86
- ...feTsVueConfig,
87
- {
88
- rules: {
89
- "@typescript-eslint/no-unused-vars": ["error", {"vars": "all", "argsIgnorePattern": "^h$"}]
90
- }
91
- }
92
- ];
93
- ```
94
-
95
65
  ## Publish
96
66
 
97
67
  ```sh
98
- $ git checkout master
99
68
  $ yarn version
100
- $ yarn publish
101
- $ git push origin master --tags
69
+ $ git push --tags
102
70
  ```
103
71
 
104
72
  ## License
@@ -1,6 +1,6 @@
1
1
  import node from "eslint-plugin-node";
2
2
  import testingLibrary from "eslint-plugin-testing-library";
3
- import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
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
- ...fixupConfigRules(
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelf/eslint-config",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "ESLint Config for Shelf Projects",
5
5
  "license": "MIT",
6
6
  "repository": "shelfio/eslint-config",
@@ -20,9 +20,7 @@
20
20
  "rules",
21
21
  "base.js",
22
22
  "frontend.js",
23
- "frontend-vue.js",
24
23
  "frontend-typescript.js",
25
- "frontend-typescript-vue.js",
26
24
  "meteor.js",
27
25
  "typescript.js"
28
26
  ],
@@ -36,39 +34,37 @@
36
34
  },
37
35
  "type": "module",
38
36
  "dependencies": {
39
- "@babel/eslint-parser": "7.24.7",
37
+ "@babel/eslint-parser": "7.25.1",
40
38
  "@babel/eslint-plugin": "7.25.1",
41
39
  "@eslint/compat": "1.1.0",
42
40
  "@eslint/eslintrc": "3.1.0",
43
41
  "@eslint/js": "9.6.0",
44
42
  "@stylistic/eslint-plugin-js": "2.6.1",
45
43
  "@types/eslint__js": "8.42.3",
46
- "@typescript-eslint/eslint-plugin": "7.16.0",
47
- "@typescript-eslint/parser": "7.16.0",
48
- "eslint-config-next": "14.2.4",
44
+ "@typescript-eslint/eslint-plugin": "7.18.0",
45
+ "@typescript-eslint/parser": "7.18.0",
46
+ "eslint-config-next": "14.2.15",
49
47
  "eslint-config-prettier": "9.1.0",
50
48
  "eslint-plugin-babel": "5.3.1",
51
- "eslint-plugin-import": "2.29.1",
52
- "eslint-plugin-jest": "28.6.0",
49
+ "eslint-plugin-import": "2.31.0",
50
+ "eslint-plugin-jest": "28.8.3",
53
51
  "eslint-plugin-jest-formatting": "3.1.0",
54
52
  "eslint-plugin-json-format": "2.0.1",
55
53
  "eslint-plugin-jsx": "0.1.0",
56
- "eslint-plugin-n": "17.9.0",
57
- "eslint-plugin-node": "11.1.0",
58
- "eslint-plugin-prettier": "5.1.3",
59
- "eslint-plugin-react": "7.34.3",
54
+ "eslint-plugin-n": "17.10.2",
55
+ "eslint-plugin-prettier": "5.2.1",
56
+ "eslint-plugin-react": "7.37.1",
60
57
  "eslint-plugin-react-hooks": "4.6.2",
61
- "eslint-plugin-shelf-no-need-lodash-methods": "2.0.5",
62
- "eslint-plugin-sonarjs": "1.0.3",
63
- "eslint-plugin-testing-library": "6.2.2",
64
- "eslint-plugin-vue": "9.27.0",
58
+ "eslint-plugin-shelf-no-need-lodash-methods": "2.0.8",
59
+ "eslint-plugin-sonarjs": "1.0.4",
60
+ "eslint-plugin-testing-library": "6.3.0",
65
61
  "eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
66
62
  "globals": "15.8.0",
67
- "typescript-eslint": "7.16.1"
63
+ "typescript-eslint": "7.18.0"
68
64
  },
69
65
  "devDependencies": {
70
66
  "husky": "8.0.3",
71
- "lint-staged": "15.2.7",
67
+ "lint-staged": "15.3.0",
72
68
  "prettier": "3.3.3"
73
69
  },
74
70
  "peerDependencies": {
@@ -1,36 +0,0 @@
1
- import tsEslint from 'typescript-eslint';
2
- import feVueConfig from './frontend-vue.js';
3
- import tsParser from "@typescript-eslint/parser";
4
- import consistentTypeAssertions from './rules/consistent-type-assertions.js';
5
- import consistentTypeImports from './rules/consistent-type-imports.js';
6
- import tsConfig from './typescript.js';
7
- import overrides from './common/overrides.js';
8
-
9
- export default [
10
- ...feVueConfig,
11
- ...tsEslint.configs.recommended,
12
- ...tsConfig,
13
- {
14
- languageOptions: {
15
- ecmaVersion: 5,
16
- sourceType: "script",
17
-
18
- parserOptions: {
19
- parser: tsParser,
20
-
21
- ecmaFeatures: {
22
- jsx: true,
23
- },
24
- },
25
- },
26
-
27
- rules: {
28
- "jest/lowercase-name": "off",
29
- ...consistentTypeAssertions,
30
- ...consistentTypeImports,
31
- "@typescript-eslint/explicit-member-accessibility": 0,
32
- },
33
- },
34
- overrides.allowRequireInConfigs,
35
- overrides.noExplicitsInTests,
36
- ];
package/frontend-vue.js DELETED
@@ -1,39 +0,0 @@
1
- import vue from "eslint-plugin-vue";
2
- import babel from "eslint-plugin-babel";
3
- import jsx from "eslint-plugin-jsx";
4
- import _import from "eslint-plugin-import";
5
- import { fixupPluginRules } from "@eslint/compat";
6
- import globals from "globals";
7
- import baseConfig from './base.js';
8
- import babelParser from '@babel/eslint-parser';
9
-
10
-
11
- export default [
12
- ...baseConfig,
13
- ...vue.configs['flat/essential'],
14
- {
15
- plugins: {
16
- vue,
17
- babel,
18
- jsx,
19
- import: fixupPluginRules(_import),
20
- },
21
-
22
- languageOptions: {
23
- globals: {
24
- ...globals.browser,
25
- },
26
-
27
- ecmaVersion: 5,
28
- sourceType: "script",
29
-
30
- parserOptions: {
31
- parser: babelParser,
32
-
33
- ecmaFeatures: {
34
- jsx: true,
35
- },
36
- },
37
- },
38
- }
39
- ];