@commencis/eslint-config 2.0.0 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @commencis/eslint-config
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat: update consistent type imports ([#370](https://github.com/Commencis/js-toolkit/pull/370))
8
+
3
9
  ## 2.0.0
4
10
 
5
11
  ### Major Changes
@@ -57,7 +57,7 @@ var GROUPS = {
57
57
  "components"
58
58
  ]),
59
59
  // Internal root alias (catch-all leftover @/ imports)
60
- INTERNAL_ROOT: [exact(""), subpath("")],
60
+ INTERNAL_ROOT: ["^@/.+$"],
61
61
  // Relative parent imports then same-dir relatives
62
62
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
63
63
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -57,7 +57,7 @@ var GROUPS = {
57
57
  "components"
58
58
  ]),
59
59
  // Internal root alias (catch-all leftover @/ imports)
60
- INTERNAL_ROOT: [exact(""), subpath("")],
60
+ INTERNAL_ROOT: ["^@/.+$"],
61
61
  // Relative parent imports then same-dir relatives
62
62
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
63
63
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -127,8 +127,14 @@ var typescriptRules = {
127
127
  "@typescript-eslint/consistent-type-definitions": "off",
128
128
  "@typescript-eslint/no-empty-function": "off",
129
129
  "@typescript-eslint/array-type": "off",
130
- "@typescript-eslint/consistent-type-imports": "error",
131
130
  "@typescript-eslint/explicit-function-return-type": "error",
131
+ "@typescript-eslint/consistent-type-imports": [
132
+ "error",
133
+ {
134
+ prefer: "type-imports",
135
+ fixStyle: "separate-type-imports"
136
+ }
137
+ ],
132
138
  "@typescript-eslint/no-unused-vars": [
133
139
  "error",
134
140
  {
@@ -57,7 +57,7 @@ var GROUPS = {
57
57
  "components"
58
58
  ]),
59
59
  // Internal root alias (catch-all leftover @/ imports)
60
- INTERNAL_ROOT: [exact(""), subpath("")],
60
+ INTERNAL_ROOT: ["^@/.+$"],
61
61
  // Relative parent imports then same-dir relatives
62
62
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
63
63
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -127,8 +127,14 @@ var typescriptRules = {
127
127
  "@typescript-eslint/consistent-type-definitions": "off",
128
128
  "@typescript-eslint/no-empty-function": "off",
129
129
  "@typescript-eslint/array-type": "off",
130
- "@typescript-eslint/consistent-type-imports": "error",
131
130
  "@typescript-eslint/explicit-function-return-type": "error",
131
+ "@typescript-eslint/consistent-type-imports": [
132
+ "error",
133
+ {
134
+ prefer: "type-imports",
135
+ fixStyle: "separate-type-imports"
136
+ }
137
+ ],
132
138
  "@typescript-eslint/no-unused-vars": [
133
139
  "error",
134
140
  {
@@ -57,7 +57,7 @@ var GROUPS = {
57
57
  "components"
58
58
  ]),
59
59
  // Internal root alias (catch-all leftover @/ imports)
60
- INTERNAL_ROOT: [exact(""), subpath("")],
60
+ INTERNAL_ROOT: ["^@/.+$"],
61
61
  // Relative parent imports then same-dir relatives
62
62
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
63
63
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -127,8 +127,14 @@ var typescriptRules = {
127
127
  "@typescript-eslint/consistent-type-definitions": "off",
128
128
  "@typescript-eslint/no-empty-function": "off",
129
129
  "@typescript-eslint/array-type": "off",
130
- "@typescript-eslint/consistent-type-imports": "error",
131
130
  "@typescript-eslint/explicit-function-return-type": "error",
131
+ "@typescript-eslint/consistent-type-imports": [
132
+ "error",
133
+ {
134
+ prefer: "type-imports",
135
+ fixStyle: "separate-type-imports"
136
+ }
137
+ ],
132
138
  "@typescript-eslint/no-unused-vars": [
133
139
  "error",
134
140
  {
@@ -53,7 +53,7 @@ var GROUPS = {
53
53
  "components"
54
54
  ]),
55
55
  // Internal root alias (catch-all leftover @/ imports)
56
- INTERNAL_ROOT: [exact(""), subpath("")],
56
+ INTERNAL_ROOT: ["^@/.+$"],
57
57
  // Relative parent imports then same-dir relatives
58
58
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
59
59
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -92,8 +92,14 @@ var typescriptRules = {
92
92
  "@typescript-eslint/consistent-type-definitions": "off",
93
93
  "@typescript-eslint/no-empty-function": "off",
94
94
  "@typescript-eslint/array-type": "off",
95
- "@typescript-eslint/consistent-type-imports": "error",
96
95
  "@typescript-eslint/explicit-function-return-type": "error",
96
+ "@typescript-eslint/consistent-type-imports": [
97
+ "error",
98
+ {
99
+ prefer: "type-imports",
100
+ fixStyle: "separate-type-imports"
101
+ }
102
+ ],
97
103
  "@typescript-eslint/no-unused-vars": [
98
104
  "error",
99
105
  {
@@ -60,7 +60,7 @@ var GROUPS = {
60
60
  "components"
61
61
  ]),
62
62
  // Internal root alias (catch-all leftover @/ imports)
63
- INTERNAL_ROOT: [exact(""), subpath("")],
63
+ INTERNAL_ROOT: ["^@/.+$"],
64
64
  // Relative parent imports then same-dir relatives
65
65
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
66
66
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -130,8 +130,14 @@ var typescriptRules = {
130
130
  "@typescript-eslint/consistent-type-definitions": "off",
131
131
  "@typescript-eslint/no-empty-function": "off",
132
132
  "@typescript-eslint/array-type": "off",
133
- "@typescript-eslint/consistent-type-imports": "error",
134
133
  "@typescript-eslint/explicit-function-return-type": "error",
134
+ "@typescript-eslint/consistent-type-imports": [
135
+ "error",
136
+ {
137
+ prefer: "type-imports",
138
+ fixStyle: "separate-type-imports"
139
+ }
140
+ ],
135
141
  "@typescript-eslint/no-unused-vars": [
136
142
  "error",
137
143
  {
package/dist/index.js CHANGED
@@ -60,7 +60,7 @@ var GROUPS = {
60
60
  "components"
61
61
  ]),
62
62
  // Internal root alias (catch-all leftover @/ imports)
63
- INTERNAL_ROOT: [exact(""), subpath("")],
63
+ INTERNAL_ROOT: ["^@/.+$"],
64
64
  // Relative parent imports then same-dir relatives
65
65
  RELATIVE_PARENT: ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
66
66
  RELATIVE_SAME: ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
@@ -130,8 +130,14 @@ var typescriptRules = {
130
130
  "@typescript-eslint/consistent-type-definitions": "off",
131
131
  "@typescript-eslint/no-empty-function": "off",
132
132
  "@typescript-eslint/array-type": "off",
133
- "@typescript-eslint/consistent-type-imports": "error",
134
133
  "@typescript-eslint/explicit-function-return-type": "error",
134
+ "@typescript-eslint/consistent-type-imports": [
135
+ "error",
136
+ {
137
+ prefer: "type-imports",
138
+ fixStyle: "separate-type-imports"
139
+ }
140
+ ],
135
141
  "@typescript-eslint/no-unused-vars": [
136
142
  "error",
137
143
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commencis/eslint-config",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Commencis ESLint config",
5
5
  "author": "Commencis WEB Team",
6
6
  "license": "Apache-2.0",