@vinicunca/eslint-config 4.3.0 → 4.4.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.d.mts CHANGED
@@ -19716,7 +19716,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
19716
19716
  onlyEquality?: boolean;
19717
19717
  }];
19718
19718
  // Names of all the configs
19719
- type ConfigNames = 'vinicunca/astro/setup' | 'vinicunca/astro/rules' | 'vinicunca/eslint-comments/rules' | 'vinicunca/formatter/setup' | 'vinicunca/imports/rules' | 'vinicunca/javascript/setup' | 'vinicunca/javascript/rules' | 'antfu/jsx/setup' | 'vinicunca/jsdoc/rules' | 'vinicunca/jsonc/setup' | 'vinicunca/jsonc/rules' | 'vinicunca/markdown/setup' | 'vinicunca/markdown/processor' | 'vinicunca/markdown/parser' | 'vinicunca/markdown/disables' | 'vinicunca/node/rules' | 'vinicunca/perfectionist/rules' | 'vinicunca/react/setup' | 'vinicunca/react/rules' | 'vinicunca/solid/setup' | 'vinicunca/solid/rules' | 'vinicunca/sort/package-json' | 'vinicunca/stylistic/rules' | 'vinicunca/svelte/setup' | 'vinicunca/svelte/rules' | 'vinicunca/test/setup' | 'vinicunca/test/rules' | 'vinicunca/toml/setup' | 'vinicunca/toml/rules' | 'vinicunca/regexp/rules' | 'vinicunca/sonar/rules' | 'vinicunca/typescript/setup' | 'vinicunca/typescript/parser' | 'vinicunca/typescript/rules' | 'vinicunca/typescript/disables/dts' | 'vinicunca/typescript/disables/tests' | 'vinicunca/typescript/disables/javascript' | 'vinicunca/unicorn/rules' | 'vinicunca/unocss' | 'vinicunca/vue/setup' | 'vinicunca/vue/rules' | 'vinicunca/yaml/setup' | 'vinicunca/yaml/rules';
19719
+ type ConfigNames = 'vinicunca/astro/setup' | 'vinicunca/astro/rules' | 'vinicunca/eslint-comments/rules' | 'vinicunca/formatter/setup' | 'vinicunca/imports/rules' | 'vinicunca/javascript/setup' | 'vinicunca/javascript/rules' | 'antfu/jsx/setup' | 'vinicunca/jsdoc/rules' | 'vinicunca/jsonc/setup' | 'vinicunca/jsonc/rules' | 'vinicunca/markdown/setup' | 'vinicunca/markdown/processor' | 'vinicunca/markdown/parser' | 'vinicunca/markdown/disables' | 'vinicunca/node/rules' | 'vinicunca/perfectionist/rules' | 'vinicunca/react/setup' | 'vinicunca/react/rules' | 'vinicunca/solid/setup' | 'vinicunca/solid/rules' | 'vinicunca/sort/package-json' | 'vinicunca/stylistic/rules' | 'vinicunca/svelte/setup' | 'vinicunca/svelte/rules' | 'vinicunca/test/setup' | 'vinicunca/test/rules' | 'vinicunca/toml/setup' | 'vinicunca/toml/rules' | 'vinicunca/regexp/rules' | 'vinicunca/sonar/rules' | 'vinicunca/typescript/setup' | 'vinicunca/typescript/parser' | 'vinicunca/typescript/rules' | 'vinicunca/unicorn/rules' | 'vinicunca/unocss' | 'vinicunca/vue/setup' | 'vinicunca/vue/rules' | 'vinicunca/yaml/setup' | 'vinicunca/yaml/rules';
19720
19720
  //#endregion
19721
19721
  //#region src/vendor/prettier-types.d.ts
19722
19722
  /**
package/dist/index.mjs CHANGED
@@ -701,32 +701,43 @@ async function javascript(options = {}) {
701
701
  setWithoutGet: true
702
702
  }],
703
703
  "antfu/no-top-level-await": ERROR,
704
- "array-callback-return": ERROR,
704
+ "array-callback-return": [ERROR, { checkForEach: true }],
705
705
  "block-scoped-var": ERROR,
706
+ "camelcase": [ERROR, {
707
+ allow: ["^UNSAFE_"],
708
+ ignoreGlobals: true,
709
+ properties: NEVER
710
+ }],
706
711
  "constructor-super": ERROR,
707
712
  "default-case-last": ERROR,
708
713
  "dot-notation": [ERROR, { allowKeywords: true }],
709
714
  "eqeqeq": [ERROR, "smart"],
715
+ "for-direction": ERROR,
710
716
  "new-cap": [ERROR, {
711
717
  capIsNew: false,
712
718
  newIsCap: true,
713
719
  properties: true
714
720
  }],
715
- "no-alert": ERROR,
721
+ "no-alert": WARN,
716
722
  "no-array-constructor": ERROR,
717
723
  "no-async-promise-executor": ERROR,
724
+ "no-await-in-loop": ERROR,
718
725
  "no-caller": ERROR,
719
726
  "no-case-declarations": ERROR,
720
727
  "no-class-assign": ERROR,
721
728
  "no-compare-neg-zero": ERROR,
722
- "no-cond-assign": [ERROR, "always"],
723
- "no-console": [ERROR, { allow: ["warn", ERROR] }],
729
+ "no-cond-assign": [ERROR, ALWAYS],
730
+ "no-console": [ERROR, { allow: [WARN, ERROR] }],
724
731
  "no-const-assign": ERROR,
732
+ "no-constant-binary-expression": ERROR,
733
+ "no-constant-condition": [ERROR, { checkLoops: false }],
734
+ "no-constructor-return": ERROR,
725
735
  "no-control-regex": ERROR,
726
736
  "no-debugger": ERROR,
727
737
  "no-delete-var": ERROR,
728
738
  "no-dupe-args": ERROR,
729
739
  "no-dupe-class-members": ERROR,
740
+ "no-dupe-else-if": ERROR,
730
741
  "no-dupe-keys": ERROR,
731
742
  "no-duplicate-case": ERROR,
732
743
  "no-empty": [ERROR, { allowEmptyCatch: true }],
@@ -753,13 +764,16 @@ async function javascript(options = {}) {
753
764
  "no-loss-of-precision": ERROR,
754
765
  "no-misleading-character-class": ERROR,
755
766
  "no-multi-str": ERROR,
767
+ "no-nested-ternary": ERROR,
756
768
  "no-new": ERROR,
757
769
  "no-new-func": ERROR,
758
770
  "no-new-native-nonconstructor": ERROR,
759
771
  "no-new-wrappers": ERROR,
760
772
  "no-obj-calls": ERROR,
773
+ "no-object-constructor": ERROR,
761
774
  "no-octal": ERROR,
762
775
  "no-octal-escape": ERROR,
776
+ "no-promise-executor-return": ERROR,
763
777
  "no-proto": ERROR,
764
778
  "no-prototype-builtins": ERROR,
765
779
  "no-redeclare": [ERROR, { builtinGlobals: false }],
@@ -800,9 +814,11 @@ async function javascript(options = {}) {
800
814
  ],
801
815
  "no-restricted-syntax": [
802
816
  ERROR,
817
+ "ForInStatement",
803
818
  "TSEnumDeclaration[const=true]",
804
819
  "TSExportAssignment"
805
820
  ],
821
+ "no-return-assign": [ERROR, ALWAYS],
806
822
  "no-self-assign": [ERROR, { props: true }],
807
823
  "no-self-compare": ERROR,
808
824
  "no-sequences": ERROR,
@@ -847,18 +863,18 @@ async function javascript(options = {}) {
847
863
  "no-with": ERROR,
848
864
  "object-shorthand": [
849
865
  ERROR,
850
- "always",
866
+ ALWAYS,
851
867
  {
852
868
  avoidQuotes: true,
853
869
  ignoreConstructors: false
854
870
  }
855
871
  ],
856
- "one-var": [ERROR, { initialized: "never" }],
872
+ "one-var": [ERROR, { initialized: NEVER }],
857
873
  "prefer-arrow-callback": [ERROR, {
858
874
  allowNamedFunctions: false,
859
875
  allowUnboundThis: true
860
876
  }],
861
- "prefer-const": [isInEditor ? "warn" : ERROR, {
877
+ "prefer-const": [isInEditor ? WARN : ERROR, {
862
878
  destructuring: "all",
863
879
  ignoreReadBeforeAssign: true
864
880
  }],
@@ -869,9 +885,9 @@ async function javascript(options = {}) {
869
885
  "prefer-spread": ERROR,
870
886
  "prefer-template": ERROR,
871
887
  "symbol-description": ERROR,
872
- "unicode-bom": [ERROR, "never"],
873
- "unused-imports/no-unused-imports": isInEditor ? "warn" : ERROR,
874
- "unused-imports/no-unused-vars": [ERROR, {
888
+ "unicode-bom": [ERROR, NEVER],
889
+ "unused-imports/no-unused-imports": isInEditor ? WARN : ERROR,
890
+ "unused-imports/no-unused-vars": [WARN, {
875
891
  args: "after-used",
876
892
  argsIgnorePattern: "^_",
877
893
  ignoreRestSiblings: true,
@@ -884,7 +900,7 @@ async function javascript(options = {}) {
884
900
  }],
885
901
  "valid-typeof": [ERROR, { requireStringLiterals: true }],
886
902
  "vars-on-top": ERROR,
887
- "yoda": [ERROR, "never"],
903
+ "yoda": [ERROR, NEVER],
888
904
  ...overrides
889
905
  }
890
906
  }];
@@ -1988,7 +2004,7 @@ async function typescript(options = {}) {
1988
2004
  "ts/no-floating-promises": ERROR,
1989
2005
  "ts/no-for-in-array": ERROR,
1990
2006
  "ts/no-implied-eval": ERROR,
1991
- "ts/no-misused-promises": OFF,
2007
+ "ts/no-misused-promises": ERROR,
1992
2008
  "ts/no-unnecessary-type-assertion": ERROR,
1993
2009
  "ts/no-unsafe-argument": ERROR,
1994
2010
  "ts/no-unsafe-assignment": ERROR,
@@ -2038,13 +2054,12 @@ async function typescript(options = {}) {
2038
2054
  }
2039
2055
  },
2040
2056
  ...isTypeAware ? [makeParser({
2057
+ files,
2058
+ typeAware: false
2059
+ }), makeParser({
2041
2060
  files: filesTypeAware,
2042
2061
  ignores: ignoresTypeAware,
2043
2062
  typeAware: true
2044
- }), makeParser({
2045
- files,
2046
- ignores: filesTypeAware,
2047
- typeAware: false
2048
2063
  })] : [makeParser({
2049
2064
  files,
2050
2065
  typeAware: false
@@ -2056,9 +2071,7 @@ async function typescript(options = {}) {
2056
2071
  ...renameRules(pluginTs.configs["eslint-recommended"].overrides[0].rules, { "@typescript-eslint": "ts" }),
2057
2072
  ...renameRules(pluginTs.configs.strict.rules, { "@typescript-eslint": "ts" }),
2058
2073
  "no-dupe-class-members": OFF,
2059
- "no-invalid-this": OFF,
2060
2074
  "no-redeclare": OFF,
2061
- "no-unused-vars": OFF,
2062
2075
  "no-use-before-define": OFF,
2063
2076
  "no-useless-constructor": OFF,
2064
2077
  "ts/array-type": [ERROR, { default: "generic" }],
@@ -2123,31 +2136,12 @@ async function typescript(options = {}) {
2123
2136
  name: "antfu/typescript/erasable-syntax-only",
2124
2137
  plugins: { "erasable-syntax-only": await interopDefault(import("./lib-DHxUIJ7x.mjs")) },
2125
2138
  rules: {
2126
- "erasable-syntax-only/enums": "error",
2127
- "erasable-syntax-only/import-aliases": "error",
2128
- "erasable-syntax-only/namespaces": "error",
2129
- "erasable-syntax-only/parameter-properties": "error"
2130
- }
2131
- }] : [],
2132
- {
2133
- files: ["**/*.d.?([cm])ts"],
2134
- name: "vinicunca/typescript/disables/dts",
2135
- rules: {
2136
- "eslint-comments/no-unlimited-disable": OFF,
2137
- "no-restricted-syntax": OFF,
2138
- "unused-imports/no-unused-vars": OFF
2139
+ "erasable-syntax-only/enums": ERROR,
2140
+ "erasable-syntax-only/import-aliases": ERROR,
2141
+ "erasable-syntax-only/namespaces": ERROR,
2142
+ "erasable-syntax-only/parameter-properties": ERROR
2139
2143
  }
2140
- },
2141
- {
2142
- files: ["**/*.{test,spec}.ts?(x)"],
2143
- name: "vinicunca/typescript/disables/tests",
2144
- rules: { "no-unused-expressions": OFF }
2145
- },
2146
- {
2147
- files: ["**/*.js", "**/*.cjs"],
2148
- name: "vinicunca/typescript/disables/javascript",
2149
- rules: { "ts/no-require-imports": OFF }
2150
- }
2144
+ }] : []
2151
2145
  ];
2152
2146
  }
2153
2147
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "4.3.0",
4
+ "version": "4.4.0",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",