@shayanthenerd/eslint-config 0.6.0 → 0.7.0
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/configs/css.js +6 -3
- package/dist/oxlint.config.jsonc +2 -1
- package/dist/rules/tailwind.js +0 -2
- package/dist/rules/vue.js +0 -1
- package/dist/types/eslint-schema.d.ts +13 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/ignores/resolveGitignorePatterns.js +1 -1
- package/package.json +5 -5
package/dist/configs/css.js
CHANGED
|
@@ -3,13 +3,15 @@ import { isEnabled } from "../utils/isEnabled.js";
|
|
|
3
3
|
import { defaultOptions } from "../utils/options/defaultOptions.js";
|
|
4
4
|
import { getCSSRules } from "../rules/css.js";
|
|
5
5
|
import eslintCSS from "@eslint/css";
|
|
6
|
-
import { tailwind4 } from "tailwind-csstree";
|
|
7
6
|
import { mergeConfigs } from "eslint-flat-config-utils";
|
|
7
|
+
import { tailwind3, tailwind4 } from "tailwind-csstree";
|
|
8
|
+
import { styleText } from "node:util";
|
|
8
9
|
|
|
9
10
|
//#region src/configs/css.ts
|
|
10
11
|
function getCSSConfig(options) {
|
|
11
|
-
const { css } = options.configs;
|
|
12
|
+
const { css, tailwind } = options.configs;
|
|
12
13
|
const { overrides } = isEnabled(css) ? css : defaultOptions.configs.css;
|
|
14
|
+
const tailwindSyntax = isEnabled(tailwind) && tailwind.entryPoint ? tailwind4 : tailwind3;
|
|
13
15
|
const cssConfig = {
|
|
14
16
|
name: "shayanthenerd/css",
|
|
15
17
|
files: [globs.css],
|
|
@@ -17,10 +19,11 @@ function getCSSConfig(options) {
|
|
|
17
19
|
language: "css/css",
|
|
18
20
|
languageOptions: {
|
|
19
21
|
tolerant: true,
|
|
20
|
-
customSyntax:
|
|
22
|
+
customSyntax: isEnabled(tailwind) ? tailwindSyntax : void 0
|
|
21
23
|
},
|
|
22
24
|
rules: getCSSRules(options)
|
|
23
25
|
};
|
|
26
|
+
console.warn(styleText("yellow", "⚠︎ Enabling the CSS config with `--cache` or `--print-config` options (CLI flags) may cause ESLint to crash. This is a known issue with the \"tailwind-csstree\" package used by \"@eslint/css\". Check out"), styleText("blue", "https://github.com/eslint/css/issues/211"), styleText("yellow", "for more details."));
|
|
24
27
|
return mergeConfigs(cssConfig, overrides);
|
|
25
28
|
}
|
|
26
29
|
|
package/dist/oxlint.config.jsonc
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
"plugins": [
|
|
26
26
|
"oxc",
|
|
27
|
+
"vue",
|
|
27
28
|
"node",
|
|
28
29
|
"jest",
|
|
29
30
|
"jsdoc",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"eslint/arrow-body-style": "off",
|
|
56
57
|
"eslint/no-duplicate-imports": "off",
|
|
57
58
|
"eslint/func-names": ["error", "as-needed"],
|
|
58
|
-
|
|
59
|
+
"eslint/grouped-accessor-pairs": ["warn", "anyOrder", { "enforceForTSTypes": true }],
|
|
59
60
|
"eslint/no-console": [
|
|
60
61
|
"warn",
|
|
61
62
|
{
|
package/dist/rules/tailwind.js
CHANGED
|
@@ -9,8 +9,6 @@ function getTailwindRules(options) {
|
|
|
9
9
|
const isTailwindV4 = isEnabled(tailwind) && tailwind.entryPoint;
|
|
10
10
|
const tailwindRules = {
|
|
11
11
|
"@stylistic/max-len": "off",
|
|
12
|
-
"css/no-duplicate-imports": "off",
|
|
13
|
-
"vue/first-attribute-linebreak": "off",
|
|
14
12
|
"better-tailwindcss/no-duplicate-classes": "error",
|
|
15
13
|
"better-tailwindcss/no-deprecated-classes": "error",
|
|
16
14
|
"better-tailwindcss/no-conflicting-classes": "error",
|
package/dist/rules/vue.js
CHANGED
|
@@ -26,7 +26,6 @@ function getVueRules(options) {
|
|
|
26
26
|
"vue/html-indent": ["warn", useTabs ? "tab" : indent],
|
|
27
27
|
"vue/v-slot-style": ["warn", { atComponent: "shorthand" }],
|
|
28
28
|
"vue/attribute-hyphenation": ["warn", attributeHyphenation],
|
|
29
|
-
"vue/first-attribute-linebreak": ["warn", { singleline: "beside" }],
|
|
30
29
|
"vue/v-on-event-hyphenation": [
|
|
31
30
|
"warn",
|
|
32
31
|
attributeHyphenation,
|
|
@@ -1661,11 +1661,21 @@ interface ESLintSchema {
|
|
|
1661
1661
|
* @see https://eslint.org/docs/latest/rules/constructor-super
|
|
1662
1662
|
*/
|
|
1663
1663
|
'constructor-super'?: Linter.RuleEntry<[]>;
|
|
1664
|
+
/**
|
|
1665
|
+
* Enforce use of fallback fonts and a generic font last
|
|
1666
|
+
* @see https://github.com/eslint/css/blob/main/docs/rules/font-family-fallbacks.md
|
|
1667
|
+
*/
|
|
1668
|
+
'css/font-family-fallbacks'?: Linter.RuleEntry<[]>;
|
|
1664
1669
|
/**
|
|
1665
1670
|
* Disallow duplicate @import rules
|
|
1666
1671
|
* @see https://github.com/eslint/css/blob/main/docs/rules/no-duplicate-imports.md
|
|
1667
1672
|
*/
|
|
1668
1673
|
'css/no-duplicate-imports'?: Linter.RuleEntry<[]>;
|
|
1674
|
+
/**
|
|
1675
|
+
* Disallow duplicate selectors within keyframe blocks
|
|
1676
|
+
* @see https://github.com/eslint/css/blob/main/docs/rules/no-duplicate-keyframe-selectors.md
|
|
1677
|
+
*/
|
|
1678
|
+
'css/no-duplicate-keyframe-selectors'?: Linter.RuleEntry<[]>;
|
|
1669
1679
|
/**
|
|
1670
1680
|
* Disallow empty blocks
|
|
1671
1681
|
* @see https://github.com/eslint/css/blob/main/docs/rules/no-empty-blocks.md
|
|
@@ -8462,11 +8472,13 @@ type CssPreferLogicalProperties = [] | [{
|
|
|
8462
8472
|
// ----- css/relative-font-units -----
|
|
8463
8473
|
type CssRelativeFontUnits = [] | [{
|
|
8464
8474
|
allowUnits?: ("%" | "cap" | "ch" | "em" | "ex" | "ic" | "lh" | "rcap" | "rch" | "rem" | "rex" | "ric" | "rlh")[];
|
|
8465
|
-
[k: string]: unknown | undefined;
|
|
8466
8475
|
}];
|
|
8467
8476
|
// ----- css/use-baseline -----
|
|
8468
8477
|
type CssUseBaseline = [] | [{
|
|
8469
8478
|
available?: (("widely" | "newly") | number);
|
|
8479
|
+
allowAtRules?: string[];
|
|
8480
|
+
allowProperties?: string[];
|
|
8481
|
+
allowSelectors?: string[];
|
|
8470
8482
|
}];
|
|
8471
8483
|
// ----- css/use-layers -----
|
|
8472
8484
|
type CssUseLayers = [] | [{
|
package/dist/types/index.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ interface Options {
|
|
|
294
294
|
/**
|
|
295
295
|
* Use [@eslint/css](https://github.com/eslint/css) to enforce CSS best practices and identify mistakes.
|
|
296
296
|
*
|
|
297
|
-
* @default false
|
|
297
|
+
* @default false
|
|
298
298
|
*/
|
|
299
299
|
css?: boolean | CSSOptions;
|
|
300
300
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import { styleText } from "node:util";
|
|
2
3
|
import { includeIgnoreFile } from "@eslint/compat";
|
|
3
4
|
import fs from "node:fs";
|
|
4
|
-
import { styleText } from "node:util";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/ignores/resolveGitignorePatterns.ts
|
|
7
7
|
const warningMessage = styleText("yellow", "⚠ Warning:");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shayanthenerd/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
|
|
6
6
|
"keywords": [
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@eslint/compat": "1.3.2",
|
|
83
|
-
"@eslint/css": "0.
|
|
83
|
+
"@eslint/css": "0.11.0",
|
|
84
84
|
"@eslint/js": "9.34.0",
|
|
85
85
|
"@html-eslint/eslint-plugin": "0.46.1",
|
|
86
86
|
"@stylistic/eslint-plugin": "5.2.3",
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"eslint": "9.34.0",
|
|
90
90
|
"eslint-flat-config-utils": "2.1.1",
|
|
91
91
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
92
|
-
"eslint-plugin-better-tailwindcss": "3.7.
|
|
92
|
+
"eslint-plugin-better-tailwindcss": "3.7.6",
|
|
93
93
|
"eslint-plugin-cypress": "5.1.1",
|
|
94
94
|
"eslint-plugin-import-x": "4.16.1",
|
|
95
|
-
"eslint-plugin-oxlint": "1.
|
|
95
|
+
"eslint-plugin-oxlint": "1.14.0",
|
|
96
96
|
"eslint-plugin-perfectionist": "4.15.0",
|
|
97
97
|
"eslint-plugin-playwright": "2.2.2",
|
|
98
98
|
"eslint-plugin-storybook": "9.1.3",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"eslint-plugin-vuejs-accessibility": "2.4.1",
|
|
102
102
|
"globals": "16.3.0",
|
|
103
103
|
"local-pkg": "1.1.2",
|
|
104
|
-
"oxlint": "1.
|
|
104
|
+
"oxlint": "1.14.0",
|
|
105
105
|
"tailwind-csstree": "0.1.3",
|
|
106
106
|
"typescript-eslint": "8.41.0"
|
|
107
107
|
},
|