@boehringer-ingelheim/eslint-config 1.0.1 → 1.1.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/README.md CHANGED
@@ -6,7 +6,7 @@ This is the shared ESLint configuration used at [Boehringer Ingelheim](https://g
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@boehringer-ingelheim/eslint-config?style=for-the-badge)](https://www.npmjs.com/package/@boehringer-ingelheim/eslint-config)
8
8
  [![npm downloads](https://img.shields.io/npm/dm/@boehringer-ingelheim/eslint-config?style=for-the-badge)](https://www.npmjs.com/package/@boehringer-ingelheim/eslint-config)
9
- [![License: Apache-2.0](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://github.com/boehringer-ingelheim/eslint-config/blob/master/LICENSE)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://github.com/boehringer-ingelheim/eslint-config/blob/master/LICENSE)
10
10
  [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=for-the-badge)](https://github.com/boehringer-ingelheim/eslint-config/graphs/commit-activity)
11
11
  [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg?logo=conventional-commits&style=for-the-badge)](https://conventionalcommits.org)
12
12
  [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-494949?logo=semantic-release&style=for-the-badge)](https://github.com/semantic-release/semantic-release)
@@ -102,11 +102,12 @@ module.exports = {
102
102
  };
103
103
  ```
104
104
 
105
- This shared ESLint configuration is specifically tailored for [React](https://reactjs.org/) projects, and extends `@boehringer-ingelheim/eslint-config/base`. It uses the browser environment, and includes recommended configurations for the following plugins: jsx-a11y, react, and react-hooks.
105
+ This shared ESLint configuration is specifically tailored for [React](https://reactjs.org/) projects, and extends `@boehringer-ingelheim/eslint-config/base`. It uses the browser environment, and includes recommended configurations for the following plugins:
106
106
 
107
107
  - [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
108
108
  - [`eslint-plugin-react`](https://github.com/jsx-eslint/eslint-plugin-react)
109
109
  - [`eslint-plugin-react-hooks`](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
110
+ - [`eslint-plugin-typescript-enum`](https://github.com/shian15810/eslint-plugin-typescript-enum)
110
111
 
111
112
  The configuration sets several custom rules, including `@typescript-eslint/ban-types` and `@typescript-eslint/consistent-type-definitions`, as well as rules for organizing and formatting import statements.
112
113
 
package/base/index.js CHANGED
@@ -17,6 +17,18 @@ module.exports = {
17
17
  "plugin:import/typescript",
18
18
  "plugin:sonarjs/recommended",
19
19
  ],
20
+ overrides: [
21
+ {
22
+ files: [
23
+ "**/*.d.ts", // TypeScript declaration files
24
+ "**/*.{spec,test}.*", // Usually test files
25
+ "*.{js,ts}", // Mostly configuration files
26
+ ],
27
+ rules: {
28
+ "import/no-unused-modules": "off",
29
+ },
30
+ },
31
+ ],
20
32
  parser: "@typescript-eslint/parser",
21
33
  parserOptions: {
22
34
  project: "./tsconfig.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boehringer-ingelheim/eslint-config",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
5
5
  "keywords": [
6
6
  "boehringer",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@rushstack/eslint-patch": "^1.2.0",
33
- "@typescript-eslint/eslint-plugin": "^5.52.0",
34
- "@typescript-eslint/parser": "^5.52.0",
33
+ "@typescript-eslint/eslint-plugin": "^5.54.1",
34
+ "@typescript-eslint/parser": "^5.54.1",
35
35
  "eslint-import-resolver-typescript": "^3.5.3",
36
36
  "eslint-plugin-import": "^2.27.5",
37
37
  "eslint-plugin-jsx-a11y": "^6.7.1",
@@ -39,18 +39,19 @@
39
39
  "eslint-plugin-react": "^7.32.2",
40
40
  "eslint-plugin-react-hooks": "^4.6.0",
41
41
  "eslint-plugin-sonarjs": "^0.18.0",
42
- "eslint-plugin-sort-keys-plus": "^1.3.1"
42
+ "eslint-plugin-sort-keys-plus": "^1.3.1",
43
+ "eslint-plugin-typescript-enum": "^2.1.0"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@boehringer-ingelheim/prettier-config": "1.0.0",
46
- "@commitlint/cli": "17.4.3",
47
- "@commitlint/config-conventional": "17.4.3",
48
- "@commitlint/types": "17.4.0",
47
+ "@commitlint/cli": "17.4.4",
48
+ "@commitlint/config-conventional": "17.4.4",
49
+ "@commitlint/types": "17.4.4",
49
50
  "@semantic-release/changelog": "6.0.2",
50
51
  "@semantic-release/git": "10.0.1",
51
52
  "dotenv-cli": "7.0.0",
52
53
  "husky": "8.0.3",
53
54
  "prettier": "2.8.4",
54
- "semantic-release": "20.1.0"
55
+ "semantic-release": "20.1.1"
55
56
  }
56
57
  }
package/react/index.js CHANGED
@@ -9,7 +9,13 @@ module.exports = {
9
9
  env: {
10
10
  browser: true,
11
11
  },
12
- extends: ["../base/index.js", "plugin:jsx-a11y/recommended", "plugin:react/recommended", "plugin:react/jsx-runtime"],
12
+ extends: [
13
+ "../base/index.js",
14
+ "plugin:jsx-a11y/recommended",
15
+ "plugin:react/recommended",
16
+ "plugin:react/jsx-runtime",
17
+ "plugin:typescript-enum/recommended",
18
+ ],
13
19
  parserOptions: {
14
20
  ecmaFeatures: {
15
21
  jsx: true,
@@ -17,7 +23,7 @@ module.exports = {
17
23
  ecmaVersion: "latest",
18
24
  sourceType: "module",
19
25
  },
20
- plugins: ["jsx-a11y", "react", "react-hooks"],
26
+ plugins: ["jsx-a11y", "react", "react-hooks", "typescript-enum"],
21
27
  rules: {
22
28
  // @typescript-eslint: https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules
23
29
  "@typescript-eslint/ban-types": [