@vinicunca/eslint-config 4.4.0 → 4.4.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.mjs +9 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
2
2
|
import process from "node:process";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs/promises";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import fs from "node:fs";
|
|
5
|
+
import fs$1 from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { isPackageExists } from "local-pkg";
|
|
8
8
|
import createCommand from "eslint-plugin-command/config";
|
|
@@ -46,7 +46,7 @@ async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {})
|
|
|
46
46
|
while (directory) {
|
|
47
47
|
const filePath = isAbsoluteName ? name : path.join(directory, name);
|
|
48
48
|
try {
|
|
49
|
-
const stats = await
|
|
49
|
+
const stats = await fs.stat(filePath);
|
|
50
50
|
if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
|
|
51
51
|
} catch {}
|
|
52
52
|
if (directory === stopAt || directory === root) break;
|
|
@@ -61,7 +61,7 @@ function findUpSync(name, { cwd = process.cwd(), type = "file", stopAt } = {}) {
|
|
|
61
61
|
while (directory) {
|
|
62
62
|
const filePath = isAbsoluteName ? name : path.join(directory, name);
|
|
63
63
|
try {
|
|
64
|
-
const stats = fs.statSync(filePath, { throwIfNoEntry: false });
|
|
64
|
+
const stats = fs$1.statSync(filePath, { throwIfNoEntry: false });
|
|
65
65
|
if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) return filePath;
|
|
66
66
|
} catch {}
|
|
67
67
|
if (directory === stopAt || directory === root) break;
|
|
@@ -1208,7 +1208,7 @@ async function perfectionist() {
|
|
|
1208
1208
|
async function detectCatalogUsage() {
|
|
1209
1209
|
const workspaceFile = await findUp("pnpm-workspace.yaml");
|
|
1210
1210
|
if (!workspaceFile) return false;
|
|
1211
|
-
const yaml$1 = await
|
|
1211
|
+
const yaml$1 = await fs.readFile(workspaceFile, "utf-8");
|
|
1212
1212
|
return yaml$1.includes("catalog:") || yaml$1.includes("catalogs:");
|
|
1213
1213
|
}
|
|
1214
1214
|
async function pnpm(options) {
|
|
@@ -2266,6 +2266,7 @@ async function vue(options = {}) {
|
|
|
2266
2266
|
] }],
|
|
2267
2267
|
"vue/component-name-in-template-casing": [ERROR, "PascalCase"],
|
|
2268
2268
|
"vue/component-options-name-casing": [ERROR, "PascalCase"],
|
|
2269
|
+
"vue/component-tags-order": OFF,
|
|
2269
2270
|
"vue/custom-event-name-casing": [
|
|
2270
2271
|
ERROR,
|
|
2271
2272
|
"camelCase",
|
|
@@ -2281,13 +2282,12 @@ async function vue(options = {}) {
|
|
|
2281
2282
|
"vue/dot-notation": [ERROR, { allowKeywords: true }],
|
|
2282
2283
|
"vue/eqeqeq": [ERROR, "smart"],
|
|
2283
2284
|
"vue/html-indent": [ERROR, indent],
|
|
2284
|
-
"vue/html-quotes": [
|
|
2285
|
+
"vue/html-quotes": [ERROR, "double"],
|
|
2285
2286
|
"vue/max-attributes-per-line": [ERROR],
|
|
2286
2287
|
"vue/multi-word-component-names": OFF,
|
|
2287
2288
|
"vue/no-constant-condition": WARN,
|
|
2288
2289
|
"vue/no-dupe-keys": OFF,
|
|
2289
2290
|
"vue/no-empty-pattern": ERROR,
|
|
2290
|
-
"vue/no-extra-parens": [ERROR, "functions"],
|
|
2291
2291
|
"vue/no-irregular-whitespace": ERROR,
|
|
2292
2292
|
"vue/no-loss-of-precision": ERROR,
|
|
2293
2293
|
"vue/no-restricted-syntax": [
|
|
@@ -2314,7 +2314,7 @@ async function vue(options = {}) {
|
|
|
2314
2314
|
"vue/prefer-import-from-vue": OFF,
|
|
2315
2315
|
"vue/prefer-separate-static-class": ERROR,
|
|
2316
2316
|
"vue/prefer-template": ERROR,
|
|
2317
|
-
"vue/prop-name-casing": [
|
|
2317
|
+
"vue/prop-name-casing": [ERROR, "camelCase"],
|
|
2318
2318
|
"vue/require-default-prop": OFF,
|
|
2319
2319
|
"vue/require-prop-types": OFF,
|
|
2320
2320
|
"vue/space-infix-ops": ERROR,
|
|
@@ -2362,7 +2362,7 @@ async function vue(options = {}) {
|
|
|
2362
2362
|
multiline: true
|
|
2363
2363
|
}],
|
|
2364
2364
|
"vue/object-curly-spacing": [ERROR, ALWAYS],
|
|
2365
|
-
"vue/object-property-newline": [ERROR, {
|
|
2365
|
+
"vue/object-property-newline": [ERROR, { allowAllPropertiesOnSameLine: true }],
|
|
2366
2366
|
"vue/operator-linebreak": [ERROR, "before"],
|
|
2367
2367
|
"vue/padding-line-between-blocks": [ERROR, ALWAYS],
|
|
2368
2368
|
"vue/quote-props": [ERROR, "consistent-as-needed"],
|