@boehringer-ingelheim/eslint-config 4.0.0-next.1 → 4.0.0-next.3

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
@@ -84,6 +84,16 @@ module.exports = {
84
84
  };
85
85
  ```
86
86
 
87
+ ### `@boehringer-ingelheim/eslint-config/base/local`
88
+
89
+ ```js
90
+ module.exports = {
91
+ extends: ["@boehringer-ingelheim/eslint-config/base/strict", "@boehringer-ingelheim/eslint-config/base/local"],
92
+ };
93
+ ```
94
+
95
+ This shared ESLint configuration configures or disables some rules for a better performance locally. With the help of [`is-ci`](https://www.npmjs.com/package/is-ci) those configs only apply to environments outside the CI pipelines.
96
+
87
97
  ### `@boehringer-ingelheim/eslint-config/base/strict`
88
98
 
89
99
  ```js
package/base/index.js CHANGED
@@ -41,9 +41,7 @@ module.exports = {
41
41
  rules: {
42
42
  // @typescript-eslint: https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules
43
43
  "@typescript-eslint/adjacent-overload-signatures": "off", // disabled due to conflict with eslint-plugin-perfectionist
44
- "@typescript-eslint/consistent-type-imports": "error",
45
44
  "@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }],
46
- "@typescript-eslint/no-import-type-side-effects": "error",
47
45
  "@typescript-eslint/no-misused-promises": [
48
46
  "error",
49
47
  {
@@ -85,7 +83,6 @@ module.exports = {
85
83
  "sort-keys": "off", // disabled due to conflict with eslint-plugin-perfectionist
86
84
 
87
85
  // eslint-plugin-import: https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules
88
- "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
89
86
  "import/no-cycle": "error",
90
87
  "import/no-unused-modules": [
91
88
  "error",
@@ -98,6 +95,12 @@ module.exports = {
98
95
  "import/order": "off", // disabled due to conflict with eslint-plugin-perfectionist
99
96
  "import/prefer-default-export": "off",
100
97
 
98
+ // Deactivated as TypeScript provides the same checks as part of standard type checking: https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting
99
+ "import/default": "off",
100
+ "import/named": "off",
101
+ "import/namespace": "off",
102
+ "import/no-named-as-default-member": "off",
103
+
101
104
  // eslint-plugin-perfectionist: https://github.com/azat-io/eslint-plugin-perfectionist
102
105
  "perfectionist/sort-array-includes": ["error", { "ignore-case": true, type: "natural" }],
103
106
  "perfectionist/sort-astro-attributes": ["error", { "ignore-case": true, type: "natural" }],
package/base/local.js ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Workaround to allow ESLint to resolve plugins that were installed
3
+ * by an external config, see https://github.com/eslint/eslint/issues/3458.
4
+ */
5
+ require("@rushstack/eslint-patch/modern-module-resolution");
6
+
7
+ const isCI = require("is-ci");
8
+
9
+ /** @type {import('eslint').ESLint.ConfigData} */
10
+ module.exports = {
11
+ rules: isCI
12
+ ? {}
13
+ : {
14
+ // Only activate in CI, as suggested here: https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting#eslint-plugin-import
15
+ "import/no-cycle": "off",
16
+ "import/no-deprecated": "off",
17
+ "import/no-named-as-default": "off",
18
+ "import/no-unused-modules": "off",
19
+ },
20
+ };
package/base/strict.js CHANGED
@@ -7,4 +7,12 @@ require("@rushstack/eslint-patch/modern-module-resolution");
7
7
  /** @type {import('eslint').ESLint.ConfigData} */
8
8
  module.exports = {
9
9
  extends: ["./index.js", "plugin:@typescript-eslint/strict-type-checked"],
10
+ rules: {
11
+ // @typescript-eslint: https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules
12
+ "@typescript-eslint/consistent-type-imports": "error",
13
+ "@typescript-eslint/no-import-type-side-effects": "error",
14
+
15
+ // eslint-plugin-import: https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules
16
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
17
+ },
10
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boehringer-ingelheim/eslint-config",
3
- "version": "4.0.0-next.1",
3
+ "version": "4.0.0-next.3",
4
4
  "description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
5
5
  "keywords": [
6
6
  "boehringer",
@@ -31,28 +31,29 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@rushstack/eslint-patch": "^1.5.1",
34
- "@typescript-eslint/eslint-plugin": "^6.7.5",
35
- "@typescript-eslint/parser": "^6.7.5",
34
+ "@typescript-eslint/eslint-plugin": "^6.10.0",
35
+ "@typescript-eslint/parser": "^6.10.0",
36
36
  "eslint-import-resolver-typescript": "^3.6.1",
37
- "eslint-plugin-import": "^2.28.1",
38
- "eslint-plugin-jsx-a11y": "^6.7.1",
37
+ "eslint-plugin-import": "^2.29.0",
38
+ "eslint-plugin-jsx-a11y": "^6.8.0",
39
39
  "eslint-plugin-perfectionist": "^2.2.0",
40
- "eslint-plugin-playwright": "^0.16.0",
40
+ "eslint-plugin-playwright": "^0.18.0",
41
41
  "eslint-plugin-react": "^7.33.2",
42
42
  "eslint-plugin-react-hooks": "^4.6.0",
43
- "eslint-plugin-sonarjs": "^0.21.0",
44
- "eslint-plugin-typescript-enum": "^2.1.0"
43
+ "eslint-plugin-sonarjs": "^0.23.0",
44
+ "eslint-plugin-typescript-enum": "^2.1.0",
45
+ "is-ci": "^3.0.1"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@boehringer-ingelheim/prettier-config": "1.0.0",
48
- "@commitlint/cli": "17.8.0",
49
- "@commitlint/config-conventional": "17.8.0",
50
- "@commitlint/types": "17.4.4",
49
+ "@commitlint/cli": "18.2.0",
50
+ "@commitlint/config-conventional": "18.1.0",
51
+ "@commitlint/types": "18.1.0",
51
52
  "@semantic-release/changelog": "6.0.3",
52
53
  "@semantic-release/git": "10.0.1",
53
54
  "dotenv-cli": "7.3.0",
54
55
  "husky": "8.0.3",
55
56
  "prettier": "3.0.3",
56
- "semantic-release": "22.0.5"
57
+ "semantic-release": "22.0.7"
57
58
  }
58
59
  }