@nijesmik/eslint-config 0.1.0 → 0.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/dist/index.d.ts +5 -0
- package/{index.ts → dist/index.js} +41 -42
- package/package.json +11 -3
package/dist/index.d.ts
ADDED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// index.ts
|
|
1
2
|
import json from "@eslint/json";
|
|
2
3
|
import importPlugin from "eslint-plugin-import";
|
|
3
4
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
@@ -5,30 +6,28 @@ import unusedImports from "eslint-plugin-unused-imports";
|
|
|
5
6
|
import { Alphabet } from "eslint-plugin-perfectionist/alphabet";
|
|
6
7
|
import { defineConfig } from "eslint/config";
|
|
7
8
|
import tseslint from "typescript-eslint";
|
|
8
|
-
|
|
9
|
-
const sortOptions = {
|
|
9
|
+
var sortOptions = {
|
|
10
10
|
type: "unsorted",
|
|
11
11
|
groups: ["unknown", "method", "callback"],
|
|
12
12
|
customGroups: [
|
|
13
13
|
{
|
|
14
14
|
type: "unsorted",
|
|
15
15
|
groupName: "callback",
|
|
16
|
-
elementNamePattern: "^on[A-Z]"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default defineConfig([
|
|
16
|
+
elementNamePattern: "^on[A-Z]"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
var index_default = defineConfig([
|
|
22
21
|
{
|
|
23
|
-
ignores: ["**/*.gen.ts", "**/dist/**"]
|
|
22
|
+
ignores: ["**/*.gen.ts", "**/dist/**"]
|
|
24
23
|
},
|
|
25
24
|
...tseslint.configs.recommended,
|
|
26
25
|
{
|
|
27
26
|
files: ["**/*.{ts,mts,cts,tsx}"],
|
|
28
27
|
languageOptions: {
|
|
29
28
|
parserOptions: {
|
|
30
|
-
tsconfigRootDir: process.cwd()
|
|
31
|
-
}
|
|
29
|
+
tsconfigRootDir: process.cwd()
|
|
30
|
+
}
|
|
32
31
|
},
|
|
33
32
|
rules: {
|
|
34
33
|
"@typescript-eslint/no-unused-vars": [
|
|
@@ -36,10 +35,10 @@ export default defineConfig([
|
|
|
36
35
|
{
|
|
37
36
|
argsIgnorePattern: "^_",
|
|
38
37
|
varsIgnorePattern: "^_",
|
|
39
|
-
caughtErrorsIgnorePattern: "^_"
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
|
38
|
+
caughtErrorsIgnorePattern: "^_"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
43
42
|
},
|
|
44
43
|
{
|
|
45
44
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
@@ -47,8 +46,8 @@ export default defineConfig([
|
|
|
47
46
|
rules: {
|
|
48
47
|
"eol-last": ["error", "always"],
|
|
49
48
|
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 1, maxBOF: 0 }],
|
|
50
|
-
"unused-imports/no-unused-imports": "error"
|
|
51
|
-
}
|
|
49
|
+
"unused-imports/no-unused-imports": "error"
|
|
50
|
+
}
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
files: ["src/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
@@ -63,31 +62,31 @@ export default defineConfig([
|
|
|
63
62
|
"error",
|
|
64
63
|
{
|
|
65
64
|
partitionByNewLine: true,
|
|
66
|
-
groups: ["unknown", "type-export"]
|
|
67
|
-
}
|
|
65
|
+
groups: ["unknown", "type-export"]
|
|
66
|
+
}
|
|
68
67
|
],
|
|
69
68
|
"perfectionist/sort-objects": [
|
|
70
69
|
"error",
|
|
71
70
|
{
|
|
72
71
|
type: "unsorted",
|
|
73
72
|
useConfigurationIf: {
|
|
74
|
-
objectType: "non-destructured"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
73
|
+
objectType: "non-destructured"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
77
76
|
],
|
|
78
77
|
"perfectionist/sort-union-types": [
|
|
79
78
|
"error",
|
|
80
79
|
{
|
|
81
80
|
type: "unsorted",
|
|
82
|
-
groups: ["unknown", "nullish"]
|
|
83
|
-
}
|
|
81
|
+
groups: ["unknown", "nullish"]
|
|
82
|
+
}
|
|
84
83
|
],
|
|
85
84
|
"perfectionist/sort-object-types": ["error", sortOptions],
|
|
86
85
|
"perfectionist/sort-intersection-types": [
|
|
87
86
|
"error",
|
|
88
87
|
{
|
|
89
|
-
groups: ["named", "unknown"]
|
|
90
|
-
}
|
|
88
|
+
groups: ["named", "unknown"]
|
|
89
|
+
}
|
|
91
90
|
],
|
|
92
91
|
"perfectionist/sort-imports": [
|
|
93
92
|
"error",
|
|
@@ -99,13 +98,13 @@ export default defineConfig([
|
|
|
99
98
|
"value-internal",
|
|
100
99
|
["value-parent", "value-sibling", "value-index"],
|
|
101
100
|
"ts-equals-import",
|
|
102
|
-
"unknown"
|
|
103
|
-
]
|
|
104
|
-
}
|
|
101
|
+
"unknown"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
105
104
|
],
|
|
106
105
|
"import/no-duplicates": ["error", { "prefer-inline": true }],
|
|
107
|
-
curly: ["error", "all"]
|
|
108
|
-
}
|
|
106
|
+
curly: ["error", "all"]
|
|
107
|
+
}
|
|
109
108
|
},
|
|
110
109
|
{
|
|
111
110
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
@@ -114,27 +113,27 @@ export default defineConfig([
|
|
|
114
113
|
"error",
|
|
115
114
|
{
|
|
116
115
|
type: "custom",
|
|
117
|
-
alphabet: Alphabet.generateRecommendedAlphabet()
|
|
118
|
-
.sortByLocaleCompare("en-US")
|
|
119
|
-
.placeAllWithCaseBeforeAllWithOtherCase("lowercase")
|
|
120
|
-
.getCharacters(),
|
|
116
|
+
alphabet: Alphabet.generateRecommendedAlphabet().sortByLocaleCompare("en-US").placeAllWithCaseBeforeAllWithOtherCase("lowercase").getCharacters(),
|
|
121
117
|
ignoreCase: false,
|
|
122
|
-
groups: ["value-import", { newlinesBetween: 0 }, "type-import"]
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
}
|
|
118
|
+
groups: ["value-import", { newlinesBetween: 0 }, "type-import"]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
126
122
|
},
|
|
127
123
|
{
|
|
128
124
|
files: ["**/*.json"],
|
|
129
125
|
ignores: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
130
126
|
plugins: { json },
|
|
131
127
|
language: "json/json",
|
|
132
|
-
extends: ["json/recommended"]
|
|
128
|
+
extends: ["json/recommended"]
|
|
133
129
|
},
|
|
134
130
|
{
|
|
135
131
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
136
132
|
plugins: { json },
|
|
137
133
|
language: "json/jsonc",
|
|
138
|
-
extends: ["json/recommended"]
|
|
139
|
-
}
|
|
134
|
+
extends: ["json/recommended"]
|
|
135
|
+
}
|
|
140
136
|
]);
|
|
137
|
+
export {
|
|
138
|
+
index_default as default
|
|
139
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nijesmik/eslint-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
5
7
|
"exports": {
|
|
6
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
7
12
|
},
|
|
8
13
|
"files": [
|
|
9
|
-
"
|
|
14
|
+
"dist"
|
|
10
15
|
],
|
|
11
16
|
"dependencies": {
|
|
12
17
|
"@eslint/json": "^0.14.0",
|
|
@@ -21,5 +26,8 @@
|
|
|
21
26
|
"devDependencies": {
|
|
22
27
|
"@types/node": "^25.3.0",
|
|
23
28
|
"eslint": "^9.39.1"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsup index.ts --format esm --dts"
|
|
24
32
|
}
|
|
25
33
|
}
|