@luxass/eslint-config 4.8.0 → 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 }
@@ -1660,9 +1663,9 @@ async function test(options = {}) {
1660
1663
  async function unocss(options = {}) {
1661
1664
  const {
1662
1665
  attributify = true,
1663
- files = [GLOB_SRC],
1664
1666
  overrides,
1665
- strict = false
1667
+ strict = false,
1668
+ configPath
1666
1669
  } = options;
1667
1670
  await ensure([
1668
1671
  "@unocss/eslint-plugin"
@@ -1674,14 +1677,17 @@ async function unocss(options = {}) {
1674
1677
  ]);
1675
1678
  return [
1676
1679
  {
1677
- name: "luxass/unocss/setup",
1680
+ name: "luxass/unocss",
1678
1681
  plugins: {
1679
1682
  unocss: pluginUnoCSS
1680
- }
1681
- },
1682
- {
1683
- name: "luxass/unocss/rules",
1684
- files,
1683
+ },
1684
+ settings: {
1685
+ ...configPath != null ? {
1686
+ unocss: {
1687
+ configPath
1688
+ }
1689
+ } : {}
1690
+ },
1685
1691
  rules: {
1686
1692
  "unocss/order": "warn",
1687
1693
  ...attributify ? {
@@ -1916,8 +1922,8 @@ async function astro(options = {}) {
1916
1922
  // src/configs/tailwindcss.ts
1917
1923
  async function tailwindcss(options = {}) {
1918
1924
  const {
1919
- files = [GLOB_SRC],
1920
- overrides
1925
+ overrides,
1926
+ configPath
1921
1927
  } = options;
1922
1928
  await ensure([
1923
1929
  "eslint-plugin-tailwindcss"
@@ -1929,7 +1935,7 @@ async function tailwindcss(options = {}) {
1929
1935
  ]);
1930
1936
  return [
1931
1937
  {
1932
- name: "luxass/tailwindcss/setup",
1938
+ name: "luxass/tailwindcss",
1933
1939
  languageOptions: {
1934
1940
  parserOptions: {
1935
1941
  ecmaFeatures: {
@@ -1937,13 +1943,16 @@ async function tailwindcss(options = {}) {
1937
1943
  }
1938
1944
  }
1939
1945
  },
1946
+ settings: {
1947
+ ...configPath != null ? {
1948
+ tailwindcss: {
1949
+ config: configPath
1950
+ }
1951
+ } : {}
1952
+ },
1940
1953
  plugins: {
1941
1954
  tailwindcss: pluginTailwindCSS
1942
- }
1943
- },
1944
- {
1945
- name: "luxass/tailwindcss/rules",
1946
- files,
1955
+ },
1947
1956
  rules: {
1948
1957
  // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/classnames-order.md
1949
1958
  "tailwindcss/classnames-order": "warn",