@zayne-labs/eslint-config 0.9.3 → 0.9.5
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/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +250 -181
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +31 -35
package/dist/index.js
CHANGED
|
@@ -275,7 +275,7 @@ const ignores = (userIgnores = []) => {
|
|
|
275
275
|
const gitIgnores = async (options) => {
|
|
276
276
|
const antfuGitIgnore = await interopDefault(import("eslint-config-flat-gitignore"));
|
|
277
277
|
const config = antfuGitIgnore({
|
|
278
|
-
name: "zayne/gitignore",
|
|
278
|
+
name: "zayne/gitignore/setup",
|
|
279
279
|
strict: false,
|
|
280
280
|
...options
|
|
281
281
|
});
|
|
@@ -313,8 +313,7 @@ const imports = async (options = {}) => {
|
|
|
313
313
|
"import/no-relative-packages": "error",
|
|
314
314
|
"import/no-self-import": "error",
|
|
315
315
|
"import/no-unresolved": "off",
|
|
316
|
-
"import/no-useless-path-segments":
|
|
317
|
-
"import/no-webpack-loader-syntax": "error",
|
|
316
|
+
"import/no-useless-path-segments": "error",
|
|
318
317
|
...stylistic$1 && { "import/newline-after-import": "error" },
|
|
319
318
|
...overrides
|
|
320
319
|
}
|
|
@@ -1357,9 +1356,10 @@ const tailwindcssBetter = async (options = {}) => {
|
|
|
1357
1356
|
{
|
|
1358
1357
|
name: "zayne/tailwindcss-better/rules",
|
|
1359
1358
|
rules: {
|
|
1360
|
-
"tailwindcss-better/multiline": "off",
|
|
1361
1359
|
"tailwindcss-better/enforce-consistent-line-wrapping": "off",
|
|
1362
1360
|
"tailwindcss-better/enforce-consistent-variable-syntax": "warn",
|
|
1361
|
+
"tailwindcss-better/enforce-shorthand-classes": "warn",
|
|
1362
|
+
"tailwindcss-better/multiline": "off",
|
|
1363
1363
|
"tailwindcss-better/no-conflicting-classes": "warn",
|
|
1364
1364
|
"tailwindcss-better/no-unregistered-classes": "warn",
|
|
1365
1365
|
...overrides
|
|
@@ -1369,7 +1369,7 @@ const tailwindcssBetter = async (options = {}) => {
|
|
|
1369
1369
|
};
|
|
1370
1370
|
/**
|
|
1371
1371
|
* @description tailwindcss v4 is not supported yet
|
|
1372
|
-
* @deprecated until eslint-plugin-tailwindcss supports tailwindcss v4
|
|
1372
|
+
* @deprecated until `eslint-plugin-tailwindcss` supports tailwindcss v4
|
|
1373
1373
|
*/
|
|
1374
1374
|
|
|
1375
1375
|
//#endregion
|
|
@@ -1448,8 +1448,7 @@ const typescript = async (options = {}) => {
|
|
|
1448
1448
|
GLOB_TS,
|
|
1449
1449
|
GLOB_TSX,
|
|
1450
1450
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
1451
|
-
], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides, overridesTypeAware, parserOptions, stylistic: stylistic$1 = true
|
|
1452
|
-
const isTypeAware = Boolean(tsconfigPath);
|
|
1451
|
+
], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], tsconfigPath, isTypeAware = Boolean(tsconfigPath), overrides, overridesTypeAware, parserOptions, stylistic: stylistic$1 = true } = options;
|
|
1453
1452
|
const tsEslint = await interopDefault(import("typescript-eslint"));
|
|
1454
1453
|
const projectServiceObject = isTypeAware && (allowDefaultProject ? {
|
|
1455
1454
|
projectService: {
|
|
@@ -1575,7 +1574,6 @@ const unicorn = async (options = {}) => {
|
|
|
1575
1574
|
kebabCase: true,
|
|
1576
1575
|
pascalCase: true
|
|
1577
1576
|
} }],
|
|
1578
|
-
...type === "app" ? { "unicorn/prefer-global-this": "off" } : { "unicorn/prefer-global-this": "warn" },
|
|
1579
1577
|
"unicorn/new-for-builtins": "off",
|
|
1580
1578
|
"unicorn/no-array-for-each": "off",
|
|
1581
1579
|
"unicorn/no-array-reduce": "off",
|
|
@@ -1583,6 +1581,7 @@ const unicorn = async (options = {}) => {
|
|
|
1583
1581
|
"unicorn/no-null": "off",
|
|
1584
1582
|
"unicorn/no-useless-undefined": ["error", { checkArguments: true }],
|
|
1585
1583
|
"unicorn/numeric-separators-style": "off",
|
|
1584
|
+
"unicorn/prefer-global-this": type === "lib" || type === "lib-strict" ? "warn" : "off",
|
|
1586
1585
|
"unicorn/prevent-abbreviations": "off",
|
|
1587
1586
|
...overrides
|
|
1588
1587
|
}
|
|
@@ -1844,15 +1843,17 @@ const zayne = (options = {}, ...userConfigs) => {
|
|
|
1844
1843
|
const enableUnicorn = restOfOptions.unicorn ?? withDefaults;
|
|
1845
1844
|
const enableYaml = restOfOptions.yaml ?? withDefaults;
|
|
1846
1845
|
const isStylistic = Boolean(enableStylistic);
|
|
1847
|
-
const tsconfigPath = isObject(enableTypeScript) && "tsconfigPath" in enableTypeScript ? enableTypeScript.tsconfigPath : null;
|
|
1846
|
+
const tsconfigPath = isObject(enableTypeScript) && "tsconfigPath" in enableTypeScript ? enableTypeScript.tsconfigPath : restOfOptions.typescript === true ? true : null;
|
|
1848
1847
|
const isTypeAware = Boolean(tsconfigPath);
|
|
1849
1848
|
const configs = [];
|
|
1850
1849
|
configs.push(ignores(restOfOptions.ignores), javascript(restOfOptions.javascript));
|
|
1850
|
+
if (enableGitignore) configs.push(gitIgnores(resolveOptions(enableGitignore)));
|
|
1851
1851
|
if (enableJsx) configs.push(jsx());
|
|
1852
1852
|
if (restOfOptions.vue) componentExts.push("vue");
|
|
1853
1853
|
if (restOfOptions.astro) componentExts.push("astro");
|
|
1854
1854
|
if (enableTypeScript) configs.push(typescript({
|
|
1855
1855
|
componentExts,
|
|
1856
|
+
isTypeAware,
|
|
1856
1857
|
stylistic: isStylistic,
|
|
1857
1858
|
...resolveOptions(enableTypeScript)
|
|
1858
1859
|
}));
|
|
@@ -1864,7 +1865,6 @@ const zayne = (options = {}, ...userConfigs) => {
|
|
|
1864
1865
|
type,
|
|
1865
1866
|
...resolveOptions(enableComments)
|
|
1866
1867
|
}));
|
|
1867
|
-
if (enableGitignore) configs.push(gitIgnores(resolveOptions(enableGitignore)));
|
|
1868
1868
|
if (enableImports) configs.push(imports({
|
|
1869
1869
|
stylistic: isStylistic,
|
|
1870
1870
|
typescript: isTypeAware,
|