@rebeccastevens/eslint-config 3.1.1 → 3.2.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/index.cjs +37 -2
- package/dist/index.d.cts +541 -21
- package/dist/index.d.mts +541 -21
- package/dist/index.mjs +37 -3
- package/package.json +21 -11
package/dist/index.cjs
CHANGED
|
@@ -78,7 +78,7 @@ async function installPackages(packages) {
|
|
|
78
78
|
m_installPackagesAction = null;
|
|
79
79
|
m_installPackagesActionResolver(allPackages);
|
|
80
80
|
m_installPackagesActionResolver = null;
|
|
81
|
-
},
|
|
81
|
+
}, 100);
|
|
82
82
|
if (m_installPackagesAction === null) {
|
|
83
83
|
m_installPackagesAction = new Promise((resolve) => {
|
|
84
84
|
m_installPackagesActionResolver = resolve;
|
|
@@ -2715,6 +2715,35 @@ async function stylistic(options) {
|
|
|
2715
2715
|
];
|
|
2716
2716
|
}
|
|
2717
2717
|
|
|
2718
|
+
async function tailwind(options) {
|
|
2719
|
+
const { overrides } = options;
|
|
2720
|
+
const [pluginTailwindCSS, pluginReadableTailwind] = (await loadPackages([
|
|
2721
|
+
"eslint-plugin-tailwindcss",
|
|
2722
|
+
"eslint-plugin-readable-tailwind",
|
|
2723
|
+
]));
|
|
2724
|
+
return [
|
|
2725
|
+
{
|
|
2726
|
+
name: "js:tailwindcss",
|
|
2727
|
+
plugins: {
|
|
2728
|
+
tailwindcss: pluginTailwindCSS,
|
|
2729
|
+
"tailwindcss-readable": pluginReadableTailwind,
|
|
2730
|
+
},
|
|
2731
|
+
rules: {
|
|
2732
|
+
"tailwindcss/classnames-order": "warn",
|
|
2733
|
+
"tailwindcss/enforces-negative-arbitrary-values": "warn",
|
|
2734
|
+
"tailwindcss/enforces-shorthand": "warn",
|
|
2735
|
+
"tailwindcss/no-arbitrary-value": "off",
|
|
2736
|
+
"tailwindcss/no-custom-classname": "off",
|
|
2737
|
+
"tailwindcss/no-contradicting-classname": "error",
|
|
2738
|
+
"tailwindcss/no-unnecessary-arbitrary-value": "warn",
|
|
2739
|
+
"tailwindcss-readable/multiline": "warn",
|
|
2740
|
+
"tailwindcss-readable/no-unnecessary-whitespace": "warn",
|
|
2741
|
+
...overrides,
|
|
2742
|
+
},
|
|
2743
|
+
},
|
|
2744
|
+
];
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2718
2747
|
async function test(options) {
|
|
2719
2748
|
const { files, overrides } = options;
|
|
2720
2749
|
const [pluginVitest, pluginNoOnlyTests] = (await loadPackages([
|
|
@@ -3605,7 +3634,7 @@ async function rsEslint(options, ...userConfigs) {
|
|
|
3605
3634
|
Boolean(process.env["VSCODE_CWD"]) ||
|
|
3606
3635
|
Boolean(process.env["JETBRAINS_IDE"]) ||
|
|
3607
3636
|
Boolean(process.env["VIM"]) ||
|
|
3608
|
-
Boolean(process.env["NVIM"])), ignores: ignoresOptions, ignoresFiles: ignoresFilesOptions = [".gitignore"], typescript: typeScriptOptions = localPkg.isPackageExists("typescript"), unocss: unoCSSOptions = localPkg.isPackageExists("unocss"), vue: vueOptions = VuePackages.some((i) => localPkg.isPackageExists(i)), react: reactOptions = ReactPackages.some((i) => localPkg.isPackageExists(i)), test: testOptions = true, jsx: jsxOptions = true, functional: functionalOptions = true, jsonc: jsoncOptions = false, yaml: yamlOptions = false, toml: tomlOptions = false, markdown: markdownOptions = false, formatters: formattersOptions = true, mode, projectRoot, } = options;
|
|
3637
|
+
Boolean(process.env["NVIM"])), ignores: ignoresOptions, ignoresFiles: ignoresFilesOptions = [".gitignore"], typescript: typeScriptOptions = localPkg.isPackageExists("typescript"), unocss: unoCSSOptions = localPkg.isPackageExists("unocss"), tailwind: tailwindOptions = localPkg.isPackageExists("tailwindcss"), vue: vueOptions = VuePackages.some((i) => localPkg.isPackageExists(i)), react: reactOptions = ReactPackages.some((i) => localPkg.isPackageExists(i)), test: testOptions = true, jsx: jsxOptions = true, functional: functionalOptions = true, jsonc: jsoncOptions = false, yaml: yamlOptions = false, toml: tomlOptions = false, markdown: markdownOptions = false, formatters: formattersOptions = true, mode, projectRoot, } = options;
|
|
3609
3638
|
const stylisticOptions = options.stylistic === false
|
|
3610
3639
|
? false
|
|
3611
3640
|
: typeof options.stylistic === "object"
|
|
@@ -3734,6 +3763,11 @@ async function rsEslint(options, ...userConfigs) {
|
|
|
3734
3763
|
overrides: getOverrides(options, "react"),
|
|
3735
3764
|
}));
|
|
3736
3765
|
}
|
|
3766
|
+
if (tailwindOptions !== false) {
|
|
3767
|
+
m_configs.push(tailwind({
|
|
3768
|
+
overrides: getOverrides(options, "tailwind"),
|
|
3769
|
+
}));
|
|
3770
|
+
}
|
|
3737
3771
|
if (unoCSSOptions !== false) {
|
|
3738
3772
|
m_configs.push(unocss({
|
|
3739
3773
|
attributify: true,
|
|
@@ -3854,6 +3888,7 @@ exports.rsEslint = rsEslint;
|
|
|
3854
3888
|
exports.sonar = sonar;
|
|
3855
3889
|
exports.sortTsconfig = sortTsconfig;
|
|
3856
3890
|
exports.stylistic = stylistic;
|
|
3891
|
+
exports.tailwind = tailwind;
|
|
3857
3892
|
exports.test = test;
|
|
3858
3893
|
exports.toml = toml;
|
|
3859
3894
|
exports.typescript = typescript;
|