@bitfactory/eslint-config 1.3.3 → 1.3.5

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
@@ -1,7 +1,7 @@
1
1
  # @bitfactory/eslint-config
2
2
 
3
3
  <p align="center">
4
- <img src="https://img.shields.io/badge/release-1.2.x-orange?style=for-the-badge" alt="Release">
4
+ <img src="https://img.shields.io/badge/release-1.3.x-orange?style=for-the-badge" alt="Release">
5
5
  <img src="https://img.shields.io/badge/eslint-%5E7.x-8080F2?style=for-the-badge" alt="ESLint">
6
6
  <a href="https://www.npmjs.com/package/@bitfactory/eslint-config"><img src="https://img.shields.io/npm/v/@bitfactory/eslint-config.svg?style=for-the-badge" alt="NPM version"></a>
7
7
  </p>
@@ -41,6 +41,14 @@ module.exports = {
41
41
  };
42
42
  ```
43
43
 
44
+ ---
45
+
46
+ ## Publishing a new version
47
+
48
+ 1. 💡 Before publishing a new version, make sure to update the version number in the `package.json` file. Make sure to run `npm install` to update the `package-lock.json` file afterwards.
49
+ 2. In case of a minor/major update, make sure to also update the badge in the `README.md` file.
50
+
51
+
44
52
  ---
45
53
 
46
54
  ### Vue.js projects
@@ -85,7 +93,7 @@ module.exports = {
85
93
  To use this config with a TypeScript project also install the following packages
86
94
 
87
95
  ```shell
88
- npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev --save-exact
96
+ npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import --save-dev --save-exact
89
97
  ```
90
98
 
91
99
  And set the following extend in `.eslintrc.js`:
@@ -103,7 +111,7 @@ module.exports = {
103
111
  To use this config with a Vue.js, TypeScript and regular JavaScript project also install the following packages
104
112
 
105
113
  ```shell
106
- npm install eslint-plugin-vue eslint-plugin-vuejs-accessibility @typescript-eslint/parser @typescript-eslint/eslint-plugin @vue/eslint-config-typescript --save-dev --save-exact
114
+ npm install eslint-plugin-vue eslint-plugin-vuejs-accessibility @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import @vue/eslint-config-typescript --save-dev --save-exact
107
115
  ```
108
116
 
109
117
  And set the following extend in `.eslintrc.js`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitfactory/eslint-config",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "ESLint sharable config for Bitfactory projects",
5
5
  "keywords": [
6
6
  "eslint",
@@ -26,6 +26,7 @@
26
26
  "@babel/core": "7.17.10",
27
27
  "@babel/eslint-parser": "7.17.0",
28
28
  "eslint": "8.15.0",
29
+ "eslint-plugin-import": "2.29.1",
29
30
  "eslint-plugin-jsdoc": "39.2.9",
30
31
  "eslint-plugin-unicorn": "42.0.0",
31
32
  "lint-staged": "12.4.1",
package/rules/es6.js CHANGED
@@ -1,11 +1,15 @@
1
1
  /* eslint-disable unicorn/prefer-module */
2
2
 
3
3
  module.exports = {
4
+ plugins: [
5
+ 'import',
6
+ ],
4
7
  rules: {
5
8
  'arrow-body-style': ['error', 'as-needed'],
6
9
  'arrow-parens': ['error', 'as-needed'],
7
10
  'arrow-spacing': 'error',
8
11
  'generator-star-spacing': ['error', 'after'],
12
+ 'import/no-duplicates': ['error'],
9
13
  'no-confusing-arrow': 'error',
10
14
  'no-duplicate-imports': [
11
15
  'error',
package/typescript.js CHANGED
@@ -12,16 +12,17 @@ module.exports = {
12
12
  ],
13
13
  files: ['**/*.ts'],
14
14
  parser: '@typescript-eslint/parser',
15
+ rules: {
16
+ '@typescript-eslint/consistent-type-imports': [
17
+ 'warn',
18
+ {
19
+ fixStyle: 'inline-type-imports',
20
+ prefer: 'type-imports',
21
+ },
22
+ ],
23
+ '@typescript-eslint/member-delimiter-style': 'error',
24
+ 'no-duplicate-imports': 'off',
25
+ },
15
26
  },
16
27
  ],
17
- rules: {
18
- '@typescript-eslint/consistent-type-imports': [
19
- 'warn',
20
- {
21
- fixStyle: 'inline-type-imports',
22
- prefer: 'type-imports',
23
- },
24
- ],
25
- '@typescript-eslint/member-delimiter-style': 'error',
26
- },
27
28
  };