@vinicunca/eslint-config 2.1.0 → 2.1.3

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.
Files changed (3) hide show
  1. package/dist/index.cjs +46 -44
  2. package/dist/index.js +46 -44
  3. package/package.json +11 -11
package/dist/index.cjs CHANGED
@@ -1567,7 +1567,6 @@ async function jsdoc(options = {}) {
1567
1567
  {
1568
1568
  name: "vinicunca:jsdoc",
1569
1569
  plugins: {
1570
- // @ts-expect-error missing types
1571
1570
  jsdoc: await interopDefault(import("eslint-plugin-jsdoc"))
1572
1571
  },
1573
1572
  rules: {
@@ -1794,7 +1793,6 @@ async function node() {
1794
1793
  }
1795
1794
 
1796
1795
  // src/configs/react.ts
1797
- var STR_PARENS_NEW_LINE = "parens-new-line";
1798
1796
  async function react(options = {}) {
1799
1797
  const {
1800
1798
  files = [GLOB_JSX, GLOB_TSX],
@@ -1842,57 +1840,17 @@ async function react(options = {}) {
1842
1840
  }],
1843
1841
  "react/destructuring-assignment": [ERROR, "always"],
1844
1842
  "react/jsx-boolean-value": [ERROR, NEVER, { always: [] }],
1845
- "react/jsx-child-element-spacing": OFF,
1846
- "react/jsx-closing-bracket-location": [ERROR, "line-aligned"],
1847
- "react/jsx-closing-tag-location": ERROR,
1848
- "react/jsx-curly-brace-presence": [ERROR, { children: NEVER, props: NEVER }],
1849
- "react/jsx-curly-newline": [ERROR, {
1850
- multiline: "consistent",
1851
- singleline: "consistent"
1852
- }],
1853
- "react/jsx-curly-spacing": [ERROR, {
1854
- children: true,
1855
- spacing: {
1856
- objectLiterals: NEVER
1857
- },
1858
- when: "always"
1859
- }],
1860
- "react/jsx-equals-spacing": [ERROR, NEVER],
1861
- "react/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
1862
- "react/jsx-indent": [ERROR, 2],
1863
- "react/jsx-indent-props": [ERROR, 2],
1864
1843
  "react/jsx-key": OFF,
1865
1844
  "react/jsx-max-depth": OFF,
1866
- "react/jsx-max-props-per-line": [ERROR, { maximum: 1, when: "multiline" }],
1867
- "react/jsx-newline": ERROR,
1868
1845
  "react/jsx-no-duplicate-props": [ERROR, { ignoreCase: true }],
1869
1846
  "react/jsx-no-literals": [OFF, { noStrings: true }],
1870
- "react/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
1871
1847
  "react/jsx-pascal-case": [ERROR, {
1872
1848
  allowAllCaps: true,
1873
1849
  ignore: []
1874
1850
  }],
1875
- "react/jsx-props-no-multi-spaces": ERROR,
1876
1851
  "react/jsx-sort-default-props": [OFF, {
1877
1852
  ignoreCase: true
1878
1853
  }],
1879
- // Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
1880
- "react/jsx-sort-props": [OFF],
1881
- "react/jsx-tag-spacing": [ERROR, {
1882
- afterOpening: NEVER,
1883
- beforeClosing: NEVER,
1884
- beforeSelfClosing: "always",
1885
- closingSlash: NEVER
1886
- }],
1887
- "react/jsx-wrap-multilines": [ERROR, {
1888
- arrow: STR_PARENS_NEW_LINE,
1889
- assignment: STR_PARENS_NEW_LINE,
1890
- condition: STR_PARENS_NEW_LINE,
1891
- declaration: STR_PARENS_NEW_LINE,
1892
- logical: STR_PARENS_NEW_LINE,
1893
- prop: STR_PARENS_NEW_LINE,
1894
- return: STR_PARENS_NEW_LINE
1895
- }],
1896
1854
  "react/no-danger": WARN,
1897
1855
  "react/no-unescaped-entities": OFF,
1898
1856
  "react/prop-types": OFF,
@@ -2122,6 +2080,7 @@ function sortTsconfig() {
2122
2080
  }
2123
2081
 
2124
2082
  // src/configs/stylistic.ts
2083
+ var STR_PARENS_NEW_LINE = "parens-new-line";
2125
2084
  var STYLISTIC_CONFIG_DEFAULTS = {
2126
2085
  indent: 2,
2127
2086
  jsx: true,
@@ -2164,6 +2123,46 @@ async function stylistic(options = {}) {
2164
2123
  "style/arrow-parens": [ERROR, ALWAYS],
2165
2124
  "style/brace-style": [ERROR],
2166
2125
  "style/func-call-spacing": [ERROR, NEVER],
2126
+ "style/jsx-child-element-spacing": OFF,
2127
+ "style/jsx-closing-bracket-location": [ERROR, "line-aligned"],
2128
+ "style/jsx-closing-tag-location": ERROR,
2129
+ "style/jsx-curly-brace-presence": [ERROR, { children: NEVER, props: NEVER }],
2130
+ "style/jsx-curly-newline": [ERROR, {
2131
+ multiline: "consistent",
2132
+ singleline: "consistent"
2133
+ }],
2134
+ "style/jsx-curly-spacing": [ERROR, {
2135
+ children: true,
2136
+ spacing: {
2137
+ objectLiterals: NEVER
2138
+ },
2139
+ when: "always"
2140
+ }],
2141
+ "style/jsx-equals-spacing": [ERROR, NEVER],
2142
+ "style/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
2143
+ "style/jsx-indent": [ERROR, 2],
2144
+ "style/jsx-indent-props": [ERROR, 2],
2145
+ "style/jsx-max-props-per-line": [ERROR, { maximum: 1, when: "multiline" }],
2146
+ "style/jsx-newline": ERROR,
2147
+ "style/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
2148
+ "style/jsx-props-no-multi-spaces": ERROR,
2149
+ // Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
2150
+ "style/jsx-sort-props": [OFF],
2151
+ "style/jsx-tag-spacing": [ERROR, {
2152
+ afterOpening: NEVER,
2153
+ beforeClosing: NEVER,
2154
+ beforeSelfClosing: "always",
2155
+ closingSlash: NEVER
2156
+ }],
2157
+ "style/jsx-wrap-multilines": [ERROR, {
2158
+ arrow: STR_PARENS_NEW_LINE,
2159
+ assignment: STR_PARENS_NEW_LINE,
2160
+ condition: STR_PARENS_NEW_LINE,
2161
+ declaration: STR_PARENS_NEW_LINE,
2162
+ logical: STR_PARENS_NEW_LINE,
2163
+ prop: STR_PARENS_NEW_LINE,
2164
+ return: STR_PARENS_NEW_LINE
2165
+ }],
2167
2166
  "style/member-delimiter-style": [ERROR],
2168
2167
  "style/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
2169
2168
  "style/object-curly-spacing": [ERROR, ALWAYS],
@@ -2335,7 +2334,8 @@ async function typescript(options = {}) {
2335
2334
  "ts/no-unused-vars": [ERROR, {
2336
2335
  argsIgnorePattern: "^_",
2337
2336
  destructuredArrayIgnorePattern: "^_",
2338
- ignoreRestSiblings: true
2337
+ ignoreRestSiblings: true,
2338
+ varsIgnorePattern: "^_"
2339
2339
  }],
2340
2340
  "ts/no-use-before-define": [ERROR, { classes: false, functions: false, variables: true }],
2341
2341
  "ts/parameter-properties": OFF,
@@ -2865,7 +2865,8 @@ async function vinicuncaESLint(options = {}, ...userConfigs) {
2865
2865
  if (enableTypeScript) {
2866
2866
  configs.push(typescript({
2867
2867
  ...resolveSubOptions(options, "typescript"),
2868
- componentExts
2868
+ componentExts,
2869
+ overrides: getOverrides(options, "typescript")
2869
2870
  }));
2870
2871
  }
2871
2872
  if (stylisticOptions) {
@@ -2883,6 +2884,7 @@ async function vinicuncaESLint(options = {}, ...userConfigs) {
2883
2884
  if (enableVue) {
2884
2885
  configs.push(vue({
2885
2886
  ...resolveSubOptions(options, "vue"),
2887
+ overrides: getOverrides(options, "vue"),
2886
2888
  stylistic: stylisticOptions,
2887
2889
  typescript: !!enableTypeScript
2888
2890
  }));
package/dist/index.js CHANGED
@@ -1477,7 +1477,6 @@ async function jsdoc(options = {}) {
1477
1477
  {
1478
1478
  name: "vinicunca:jsdoc",
1479
1479
  plugins: {
1480
- // @ts-expect-error missing types
1481
1480
  jsdoc: await interopDefault(import("eslint-plugin-jsdoc"))
1482
1481
  },
1483
1482
  rules: {
@@ -1704,7 +1703,6 @@ async function node() {
1704
1703
  }
1705
1704
 
1706
1705
  // src/configs/react.ts
1707
- var STR_PARENS_NEW_LINE = "parens-new-line";
1708
1706
  async function react(options = {}) {
1709
1707
  const {
1710
1708
  files = [GLOB_JSX, GLOB_TSX],
@@ -1752,57 +1750,17 @@ async function react(options = {}) {
1752
1750
  }],
1753
1751
  "react/destructuring-assignment": [ERROR, "always"],
1754
1752
  "react/jsx-boolean-value": [ERROR, NEVER, { always: [] }],
1755
- "react/jsx-child-element-spacing": OFF,
1756
- "react/jsx-closing-bracket-location": [ERROR, "line-aligned"],
1757
- "react/jsx-closing-tag-location": ERROR,
1758
- "react/jsx-curly-brace-presence": [ERROR, { children: NEVER, props: NEVER }],
1759
- "react/jsx-curly-newline": [ERROR, {
1760
- multiline: "consistent",
1761
- singleline: "consistent"
1762
- }],
1763
- "react/jsx-curly-spacing": [ERROR, {
1764
- children: true,
1765
- spacing: {
1766
- objectLiterals: NEVER
1767
- },
1768
- when: "always"
1769
- }],
1770
- "react/jsx-equals-spacing": [ERROR, NEVER],
1771
- "react/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
1772
- "react/jsx-indent": [ERROR, 2],
1773
- "react/jsx-indent-props": [ERROR, 2],
1774
1753
  "react/jsx-key": OFF,
1775
1754
  "react/jsx-max-depth": OFF,
1776
- "react/jsx-max-props-per-line": [ERROR, { maximum: 1, when: "multiline" }],
1777
- "react/jsx-newline": ERROR,
1778
1755
  "react/jsx-no-duplicate-props": [ERROR, { ignoreCase: true }],
1779
1756
  "react/jsx-no-literals": [OFF, { noStrings: true }],
1780
- "react/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
1781
1757
  "react/jsx-pascal-case": [ERROR, {
1782
1758
  allowAllCaps: true,
1783
1759
  ignore: []
1784
1760
  }],
1785
- "react/jsx-props-no-multi-spaces": ERROR,
1786
1761
  "react/jsx-sort-default-props": [OFF, {
1787
1762
  ignoreCase: true
1788
1763
  }],
1789
- // Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
1790
- "react/jsx-sort-props": [OFF],
1791
- "react/jsx-tag-spacing": [ERROR, {
1792
- afterOpening: NEVER,
1793
- beforeClosing: NEVER,
1794
- beforeSelfClosing: "always",
1795
- closingSlash: NEVER
1796
- }],
1797
- "react/jsx-wrap-multilines": [ERROR, {
1798
- arrow: STR_PARENS_NEW_LINE,
1799
- assignment: STR_PARENS_NEW_LINE,
1800
- condition: STR_PARENS_NEW_LINE,
1801
- declaration: STR_PARENS_NEW_LINE,
1802
- logical: STR_PARENS_NEW_LINE,
1803
- prop: STR_PARENS_NEW_LINE,
1804
- return: STR_PARENS_NEW_LINE
1805
- }],
1806
1764
  "react/no-danger": WARN,
1807
1765
  "react/no-unescaped-entities": OFF,
1808
1766
  "react/prop-types": OFF,
@@ -2032,6 +1990,7 @@ function sortTsconfig() {
2032
1990
  }
2033
1991
 
2034
1992
  // src/configs/stylistic.ts
1993
+ var STR_PARENS_NEW_LINE = "parens-new-line";
2035
1994
  var STYLISTIC_CONFIG_DEFAULTS = {
2036
1995
  indent: 2,
2037
1996
  jsx: true,
@@ -2074,6 +2033,46 @@ async function stylistic(options = {}) {
2074
2033
  "style/arrow-parens": [ERROR, ALWAYS],
2075
2034
  "style/brace-style": [ERROR],
2076
2035
  "style/func-call-spacing": [ERROR, NEVER],
2036
+ "style/jsx-child-element-spacing": OFF,
2037
+ "style/jsx-closing-bracket-location": [ERROR, "line-aligned"],
2038
+ "style/jsx-closing-tag-location": ERROR,
2039
+ "style/jsx-curly-brace-presence": [ERROR, { children: NEVER, props: NEVER }],
2040
+ "style/jsx-curly-newline": [ERROR, {
2041
+ multiline: "consistent",
2042
+ singleline: "consistent"
2043
+ }],
2044
+ "style/jsx-curly-spacing": [ERROR, {
2045
+ children: true,
2046
+ spacing: {
2047
+ objectLiterals: NEVER
2048
+ },
2049
+ when: "always"
2050
+ }],
2051
+ "style/jsx-equals-spacing": [ERROR, NEVER],
2052
+ "style/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
2053
+ "style/jsx-indent": [ERROR, 2],
2054
+ "style/jsx-indent-props": [ERROR, 2],
2055
+ "style/jsx-max-props-per-line": [ERROR, { maximum: 1, when: "multiline" }],
2056
+ "style/jsx-newline": ERROR,
2057
+ "style/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
2058
+ "style/jsx-props-no-multi-spaces": ERROR,
2059
+ // Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
2060
+ "style/jsx-sort-props": [OFF],
2061
+ "style/jsx-tag-spacing": [ERROR, {
2062
+ afterOpening: NEVER,
2063
+ beforeClosing: NEVER,
2064
+ beforeSelfClosing: "always",
2065
+ closingSlash: NEVER
2066
+ }],
2067
+ "style/jsx-wrap-multilines": [ERROR, {
2068
+ arrow: STR_PARENS_NEW_LINE,
2069
+ assignment: STR_PARENS_NEW_LINE,
2070
+ condition: STR_PARENS_NEW_LINE,
2071
+ declaration: STR_PARENS_NEW_LINE,
2072
+ logical: STR_PARENS_NEW_LINE,
2073
+ prop: STR_PARENS_NEW_LINE,
2074
+ return: STR_PARENS_NEW_LINE
2075
+ }],
2077
2076
  "style/member-delimiter-style": [ERROR],
2078
2077
  "style/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
2079
2078
  "style/object-curly-spacing": [ERROR, ALWAYS],
@@ -2245,7 +2244,8 @@ async function typescript(options = {}) {
2245
2244
  "ts/no-unused-vars": [ERROR, {
2246
2245
  argsIgnorePattern: "^_",
2247
2246
  destructuredArrayIgnorePattern: "^_",
2248
- ignoreRestSiblings: true
2247
+ ignoreRestSiblings: true,
2248
+ varsIgnorePattern: "^_"
2249
2249
  }],
2250
2250
  "ts/no-use-before-define": [ERROR, { classes: false, functions: false, variables: true }],
2251
2251
  "ts/parameter-properties": OFF,
@@ -2775,7 +2775,8 @@ async function vinicuncaESLint(options = {}, ...userConfigs) {
2775
2775
  if (enableTypeScript) {
2776
2776
  configs.push(typescript({
2777
2777
  ...resolveSubOptions(options, "typescript"),
2778
- componentExts
2778
+ componentExts,
2779
+ overrides: getOverrides(options, "typescript")
2779
2780
  }));
2780
2781
  }
2781
2782
  if (stylisticOptions) {
@@ -2793,6 +2794,7 @@ async function vinicuncaESLint(options = {}, ...userConfigs) {
2793
2794
  if (enableVue) {
2794
2795
  configs.push(vue({
2795
2796
  ...resolveSubOptions(options, "vue"),
2797
+ overrides: getOverrides(options, "vue"),
2796
2798
  stylistic: stylisticOptions,
2797
2799
  typescript: !!enableTypeScript
2798
2800
  }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.1.3",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -60,21 +60,21 @@
60
60
  "dependencies": {
61
61
  "@antfu/eslint-define-config": "1.23.0-2",
62
62
  "@eslint-types/jsdoc": "^46.9.1",
63
- "@eslint-types/typescript-eslint": "^6.16.0",
63
+ "@eslint-types/typescript-eslint": "^6.17.0",
64
64
  "@eslint-types/unicorn": "^50.0.1",
65
- "@stylistic/eslint-plugin": "^1.5.1",
66
- "@typescript-eslint/eslint-plugin": "^6.16.0",
67
- "@typescript-eslint/parser": "^6.16.0",
68
- "@unocss/eslint-plugin": "^0.58.1",
65
+ "@stylistic/eslint-plugin": "^1.5.3",
66
+ "@typescript-eslint/eslint-plugin": "^6.18.1",
67
+ "@typescript-eslint/parser": "^6.18.1",
68
+ "@unocss/eslint-plugin": "^0.58.3",
69
69
  "@vinicunca/eslint-plugin-vinicunca": "^1.0.10",
70
70
  "eslint-merge-processors": "^0.1.0",
71
71
  "eslint-plugin-eslint-comments": "^3.2.0",
72
72
  "eslint-plugin-format": "^0.1.0",
73
73
  "eslint-plugin-i": "^2.29.1",
74
- "eslint-plugin-jsdoc": "^46.9.1",
74
+ "eslint-plugin-jsdoc": "^48.0.2",
75
75
  "eslint-plugin-jsonc": "^2.11.2",
76
76
  "eslint-plugin-markdown": "^3.0.1",
77
- "eslint-plugin-n": "^16.5.0",
77
+ "eslint-plugin-n": "^16.6.2",
78
78
  "eslint-plugin-no-only-tests": "^3.1.0",
79
79
  "eslint-plugin-perfectionist": "^2.5.0",
80
80
  "eslint-plugin-react": "^7.33.2",
@@ -89,11 +89,11 @@
89
89
  "jsonc-eslint-parser": "^2.4.0",
90
90
  "local-pkg": "^0.5.0",
91
91
  "parse-gitignore": "^2.0.0",
92
- "vue-eslint-parser": "^9.3.2",
92
+ "vue-eslint-parser": "^9.4.0",
93
93
  "yaml-eslint-parser": "^1.2.2"
94
94
  },
95
95
  "devDependencies": {
96
- "@eslint-stylistic/metadata": "^1.5.1",
96
+ "@eslint-stylistic/metadata": "^1.5.3",
97
97
  "@types/eslint": "^8.56.0",
98
98
  "@types/fs-extra": "^11.0.4",
99
99
  "execa": "^8.0.1",
@@ -101,7 +101,7 @@
101
101
  "fs-extra": "^11.2.0",
102
102
  "react": "^18.2.0",
103
103
  "tsup": "^8.0.1",
104
- "vue": "^3.3.13"
104
+ "vue": "^3.4.7"
105
105
  },
106
106
  "scripts": {
107
107
  "lint": "eslint -v",