eslint-config-decent 3.1.61 → 3.1.63
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/dist/index.cjs +12 -1
- package/dist/index.mjs +12 -1
- package/package.json +2 -2
- package/src/import.ts +4 -0
- package/src/index.ts +7 -0
- package/src/typescriptEslint.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -393,6 +393,10 @@ const base$c = {
|
|
|
393
393
|
import: importPlugin__default
|
|
394
394
|
},
|
|
395
395
|
rules: {
|
|
396
|
+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
397
|
+
"import/first": "error",
|
|
398
|
+
"import/newline-after-import": "error",
|
|
399
|
+
"import/no-duplicates": "error",
|
|
396
400
|
"import/order": [
|
|
397
401
|
"error",
|
|
398
402
|
{
|
|
@@ -741,7 +745,7 @@ const base$2 = {
|
|
|
741
745
|
default: "array"
|
|
742
746
|
}
|
|
743
747
|
],
|
|
744
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
|
748
|
+
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
|
|
745
749
|
"@typescript-eslint/ban-ts-comment": [
|
|
746
750
|
"error",
|
|
747
751
|
{
|
|
@@ -930,6 +934,13 @@ function decentConfig(options) {
|
|
|
930
934
|
files: ["**/*.ts", "**/*.tsx"],
|
|
931
935
|
...configs$2.base
|
|
932
936
|
},
|
|
937
|
+
{
|
|
938
|
+
name: "eslint-config-decent/ts",
|
|
939
|
+
files: ["**/*.ts", "**/*.tsx", "**/*.mjs"],
|
|
940
|
+
rules: {
|
|
941
|
+
"import/no-commonjs": "error"
|
|
942
|
+
}
|
|
943
|
+
},
|
|
933
944
|
...enableReact ? [
|
|
934
945
|
{
|
|
935
946
|
name: "eslint-config-decent/tsx",
|
package/dist/index.mjs
CHANGED
|
@@ -369,6 +369,10 @@ const base$c = {
|
|
|
369
369
|
import: importPlugin
|
|
370
370
|
},
|
|
371
371
|
rules: {
|
|
372
|
+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
373
|
+
"import/first": "error",
|
|
374
|
+
"import/newline-after-import": "error",
|
|
375
|
+
"import/no-duplicates": "error",
|
|
372
376
|
"import/order": [
|
|
373
377
|
"error",
|
|
374
378
|
{
|
|
@@ -717,7 +721,7 @@ const base$2 = {
|
|
|
717
721
|
default: "array"
|
|
718
722
|
}
|
|
719
723
|
],
|
|
720
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
|
724
|
+
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
|
|
721
725
|
"@typescript-eslint/ban-ts-comment": [
|
|
722
726
|
"error",
|
|
723
727
|
{
|
|
@@ -906,6 +910,13 @@ function decentConfig(options) {
|
|
|
906
910
|
files: ["**/*.ts", "**/*.tsx"],
|
|
907
911
|
...configs$2.base
|
|
908
912
|
},
|
|
913
|
+
{
|
|
914
|
+
name: "eslint-config-decent/ts",
|
|
915
|
+
files: ["**/*.ts", "**/*.tsx", "**/*.mjs"],
|
|
916
|
+
rules: {
|
|
917
|
+
"import/no-commonjs": "error"
|
|
918
|
+
}
|
|
919
|
+
},
|
|
909
920
|
...enableReact ? [
|
|
910
921
|
{
|
|
911
922
|
name: "eslint-config-decent/tsx",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-decent",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.63",
|
|
4
4
|
"description": "A decent ESLint configuration",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@semantic-release/github": "12.0.2",
|
|
97
97
|
"@semantic-release/npm": "13.1.3",
|
|
98
98
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
99
|
-
"@swc/core": "1.15.
|
|
99
|
+
"@swc/core": "1.15.4",
|
|
100
100
|
"@types/node": ">=22",
|
|
101
101
|
"eslint": "9.39.2",
|
|
102
102
|
"husky": "9.1.7",
|
package/src/import.ts
CHANGED
|
@@ -6,6 +6,10 @@ const base: Config = {
|
|
|
6
6
|
import: importPlugin as unknown as Plugin,
|
|
7
7
|
},
|
|
8
8
|
rules: {
|
|
9
|
+
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
10
|
+
'import/first': 'error',
|
|
11
|
+
'import/newline-after-import': 'error',
|
|
12
|
+
'import/no-duplicates': 'error',
|
|
9
13
|
'import/order': [
|
|
10
14
|
'error',
|
|
11
15
|
{
|
package/src/index.ts
CHANGED
|
@@ -128,6 +128,13 @@ function decentConfig(options?: DefaultConfigOptions): ConfigWithExtends[] {
|
|
|
128
128
|
files: ['**/*.ts', '**/*.tsx'],
|
|
129
129
|
...typescriptEslintConfigs.base,
|
|
130
130
|
},
|
|
131
|
+
{
|
|
132
|
+
name: 'eslint-config-decent/ts',
|
|
133
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mjs'],
|
|
134
|
+
rules: {
|
|
135
|
+
'import/no-commonjs': 'error',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
131
138
|
...(enableReact
|
|
132
139
|
? ([
|
|
133
140
|
{
|
package/src/typescriptEslint.ts
CHANGED
|
@@ -14,7 +14,7 @@ const base: Config = {
|
|
|
14
14
|
default: 'array',
|
|
15
15
|
},
|
|
16
16
|
],
|
|
17
|
-
'@typescript-eslint/consistent-type-imports': 'error',
|
|
17
|
+
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
|
|
18
18
|
'@typescript-eslint/ban-ts-comment': [
|
|
19
19
|
'error',
|
|
20
20
|
{
|