@rhapsodic/eslint-config 1.0.1 → 1.0.3
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 +13 -24
- package/dist/index.d.mts +797 -1279
- package/dist/index.mjs +7 -7
- package/package.json +30 -29
package/dist/index.mjs
CHANGED
|
@@ -87,7 +87,7 @@ async function ignores(userIgnores = []) {
|
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/configs/imports.ts
|
|
89
89
|
async function imports(options = {}) {
|
|
90
|
-
const { overrides = {}, stylistic
|
|
90
|
+
const { overrides = {}, stylistic = true } = options;
|
|
91
91
|
return [{
|
|
92
92
|
name: "rhapsodic/imports/rules",
|
|
93
93
|
plugins: { import: pluginImportX },
|
|
@@ -98,7 +98,7 @@ async function imports(options = {}) {
|
|
|
98
98
|
"import/no-named-as-default": "warn",
|
|
99
99
|
"import/no-named-as-default-member": "warn",
|
|
100
100
|
"import/no-duplicates": "warn",
|
|
101
|
-
...stylistic
|
|
101
|
+
...stylistic ? { "import/newline-after-import": ["error", { count: 1 }] } : {},
|
|
102
102
|
...overrides
|
|
103
103
|
}
|
|
104
104
|
}];
|
|
@@ -385,10 +385,10 @@ async function typescript(options = {}) {
|
|
|
385
385
|
];
|
|
386
386
|
const tsconfigPath = options?.tsconfigPath ?? void 0;
|
|
387
387
|
const [pluginTs, parserTs] = await Promise.all([interopDefault(import("@typescript-eslint/eslint-plugin")), interopDefault(import("@typescript-eslint/parser"))]);
|
|
388
|
-
function makeParser(filesArray, ignores
|
|
388
|
+
function makeParser(filesArray, ignores) {
|
|
389
389
|
return {
|
|
390
390
|
files: filesArray,
|
|
391
|
-
...ignores
|
|
391
|
+
...ignores ? { ignores } : {},
|
|
392
392
|
languageOptions: {
|
|
393
393
|
parser: parserTs,
|
|
394
394
|
parserOptions: {
|
|
@@ -474,9 +474,9 @@ async function unicorn(options = {}) {
|
|
|
474
474
|
//#endregion
|
|
475
475
|
//#region src/configs/vue.ts
|
|
476
476
|
async function vue(options = {}) {
|
|
477
|
-
const { a11y = false, files = [GLOB_VUE], overrides = {}, stylistic
|
|
477
|
+
const { a11y = false, files = [GLOB_VUE], overrides = {}, stylistic = true } = options;
|
|
478
478
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
479
|
-
const { indent = 2 } = typeof stylistic
|
|
479
|
+
const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
|
|
480
480
|
if (a11y) await ensurePackages(["eslint-plugin-vuejs-accessibility"]);
|
|
481
481
|
const [pluginVue, parserVue, processorVueBlocks, pluginVueA11y] = await Promise.all([
|
|
482
482
|
interopDefault(import("eslint-plugin-vue")),
|
|
@@ -590,7 +590,7 @@ async function vue(options = {}) {
|
|
|
590
590
|
"vue/prefer-template": "error",
|
|
591
591
|
"vue/require-default-prop": "off",
|
|
592
592
|
"vue/return-in-computed-property": "off",
|
|
593
|
-
...stylistic
|
|
593
|
+
...stylistic ? {
|
|
594
594
|
"style/max-len": "off",
|
|
595
595
|
"vue/array-bracket-newline": ["error", "consistent"],
|
|
596
596
|
"vue/array-bracket-spacing": ["error", "never"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhapsodic/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "Rhapsodic's ESLint config",
|
|
6
6
|
"author": "Svyatoslav Fyodorov <intelrug@gmail.com> (https://github.com/intelrug/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,52 +26,53 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"eslint": "^9.
|
|
30
|
-
"eslint-plugin-vuejs-accessibility": "^2.4.1"
|
|
29
|
+
"eslint": "^9.35.0",
|
|
30
|
+
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
31
|
+
"vue": "^3.0.0"
|
|
31
32
|
},
|
|
32
33
|
"peerDependenciesMeta": {
|
|
33
34
|
"eslint-plugin-vuejs-accessibility": {
|
|
34
35
|
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"vue": {
|
|
38
|
+
"optional": true
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
41
|
"dependencies": {
|
|
38
42
|
"@antfu/install-pkg": "^1.1.0",
|
|
39
|
-
"@clack/prompts": "^0.
|
|
40
|
-
"@stylistic/eslint-plugin": "^5.
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
42
|
-
"@typescript-eslint/parser": "^8.
|
|
43
|
-
"eslint-flat-config-utils": "^
|
|
43
|
+
"@clack/prompts": "^1.0.1",
|
|
44
|
+
"@stylistic/eslint-plugin": "^5.8.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
47
|
+
"eslint-flat-config-utils": "^3.0.1",
|
|
44
48
|
"eslint-merge-processors": "^2.0.0",
|
|
45
49
|
"eslint-plugin-import-x": "^4.16.1",
|
|
46
|
-
"eslint-plugin-unicorn": "^
|
|
47
|
-
"eslint-plugin-vue": "^10.
|
|
50
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
51
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
48
52
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
49
|
-
"globals": "^
|
|
53
|
+
"globals": "^17.3.0",
|
|
50
54
|
"local-pkg": "^1.1.2",
|
|
51
|
-
"vue-eslint-parser": "^10.
|
|
55
|
+
"vue-eslint-parser": "^10.4.0"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
54
|
-
"@antfu/ni": "^
|
|
55
|
-
"@eslint/config-inspector": "^1.
|
|
56
|
-
"@types/node": "^24.10.
|
|
57
|
-
"bumpp": "^10.
|
|
58
|
-
"eslint": "^
|
|
59
|
-
"eslint-plugin-vuejs-accessibility": "^2.
|
|
58
|
+
"@antfu/ni": "^28.2.0",
|
|
59
|
+
"@eslint/config-inspector": "^1.4.2",
|
|
60
|
+
"@types/node": "^24.10.13",
|
|
61
|
+
"bumpp": "^10.4.1",
|
|
62
|
+
"eslint": "^10.0.0",
|
|
63
|
+
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
60
64
|
"eslint-typegen": "^2.3.0",
|
|
61
|
-
"execa": "^9.6.
|
|
62
|
-
"lint-staged": "^16.2.
|
|
63
|
-
"pnpm-workspace-yaml": "^1.
|
|
65
|
+
"execa": "^9.6.1",
|
|
66
|
+
"lint-staged": "^16.2.7",
|
|
67
|
+
"pnpm-workspace-yaml": "^1.5.0",
|
|
64
68
|
"simple-git-hooks": "^2.13.1",
|
|
65
69
|
"tinyglobby": "^0.2.15",
|
|
66
|
-
"tsdown": "^0.
|
|
67
|
-
"tsx": "^4.
|
|
70
|
+
"tsdown": "^0.20.3",
|
|
71
|
+
"tsx": "^4.21.0",
|
|
68
72
|
"typescript": "^5.9.3",
|
|
69
|
-
"vitest": "^4.0.
|
|
70
|
-
"vue": "^3.5.
|
|
71
|
-
"@rhapsodic/eslint-config": "1.0.
|
|
72
|
-
},
|
|
73
|
-
"resolutions": {
|
|
74
|
-
"eslint": "catalog:peer"
|
|
73
|
+
"vitest": "^4.0.18",
|
|
74
|
+
"vue": "^3.5.28",
|
|
75
|
+
"@rhapsodic/eslint-config": "1.0.3"
|
|
75
76
|
},
|
|
76
77
|
"simple-git-hooks": {
|
|
77
78
|
"pre-commit": "npx lint-staged"
|