@luxass/eslint-config 4.8.1 → 4.8.2

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 CHANGED
@@ -936,6 +936,9 @@ async function jsonc(options = {}) {
936
936
  overrides = {},
937
937
  stylistic: stylistic2 = true
938
938
  } = options;
939
+ const {
940
+ indent = 2
941
+ } = typeof stylistic2 === "boolean" ? {} : stylistic2;
939
942
  const [
940
943
  pluginJsonc,
941
944
  parserJsonc
@@ -987,7 +990,7 @@ async function jsonc(options = {}) {
987
990
  "jsonc/array-bracket-spacing": ["error", "never"],
988
991
  "jsonc/comma-dangle": ["error", "never"],
989
992
  "jsonc/comma-style": ["error", "last"],
990
- "jsonc/indent": ["error", 2],
993
+ "jsonc/indent": ["error", indent],
991
994
  "jsonc/key-spacing": [
992
995
  "error",
993
996
  { afterColon: true, beforeColon: false }
@@ -1661,7 +1664,8 @@ async function unocss(options = {}) {
1661
1664
  const {
1662
1665
  attributify = true,
1663
1666
  overrides,
1664
- strict = false
1667
+ strict = false,
1668
+ configPath
1665
1669
  } = options;
1666
1670
  await ensure([
1667
1671
  "@unocss/eslint-plugin"
@@ -1677,6 +1681,13 @@ async function unocss(options = {}) {
1677
1681
  plugins: {
1678
1682
  unocss: pluginUnoCSS
1679
1683
  },
1684
+ settings: {
1685
+ ...configPath != null ? {
1686
+ unocss: {
1687
+ configPath
1688
+ }
1689
+ } : {}
1690
+ },
1680
1691
  rules: {
1681
1692
  "unocss/order": "warn",
1682
1693
  ...attributify ? {
@@ -1911,8 +1922,8 @@ async function astro(options = {}) {
1911
1922
  // src/configs/tailwindcss.ts
1912
1923
  async function tailwindcss(options = {}) {
1913
1924
  const {
1914
- files = [GLOB_SRC],
1915
- overrides
1925
+ overrides,
1926
+ configPath
1916
1927
  } = options;
1917
1928
  await ensure([
1918
1929
  "eslint-plugin-tailwindcss"
@@ -1924,7 +1935,7 @@ async function tailwindcss(options = {}) {
1924
1935
  ]);
1925
1936
  return [
1926
1937
  {
1927
- name: "luxass/tailwindcss/setup",
1938
+ name: "luxass/tailwindcss",
1928
1939
  languageOptions: {
1929
1940
  parserOptions: {
1930
1941
  ecmaFeatures: {
@@ -1932,13 +1943,16 @@ async function tailwindcss(options = {}) {
1932
1943
  }
1933
1944
  }
1934
1945
  },
1946
+ settings: {
1947
+ ...configPath != null ? {
1948
+ tailwindcss: {
1949
+ config: configPath
1950
+ }
1951
+ } : {}
1952
+ },
1935
1953
  plugins: {
1936
1954
  tailwindcss: pluginTailwindCSS
1937
- }
1938
- },
1939
- {
1940
- name: "luxass/tailwindcss/rules",
1941
- files,
1955
+ },
1942
1956
  rules: {
1943
1957
  // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/classnames-order.md
1944
1958
  "tailwindcss/classnames-order": "warn",