acaleph-eslint 1.2.0 → 1.2.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
@@ -13384,19 +13384,6 @@ async function react(options = {}) {
13384
13384
  name: "acaleph/react/rules",
13385
13385
  rules: {
13386
13386
  ...pluginReact.configs.recommended.rules,
13387
- // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
13388
- "react-dom/no-dangerously-set-innerhtml": "warn",
13389
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
13390
- "react-dom/no-find-dom-node": "error",
13391
- "react-dom/no-flush-sync": "error",
13392
- "react-dom/no-hydrate": "error",
13393
- "react-dom/no-namespace": "error",
13394
- "react-dom/no-render": "error",
13395
- "react-dom/no-render-return-value": "error",
13396
- "react-dom/no-script-url": "warn",
13397
- "react-dom/no-unsafe-iframe-sandbox": "warn",
13398
- "react-dom/no-use-form-state": "error",
13399
- "react-dom/no-void-elements-with-children": "error",
13400
13387
  "react-refresh/only-export-components": [
13401
13388
  "error",
13402
13389
  {
@@ -13912,6 +13899,7 @@ async function typescript(options = {}) {
13912
13899
  const {
13913
13900
  componentExts = [],
13914
13901
  erasableOnly = false,
13902
+ globals: globals2 = {},
13915
13903
  overrides = {},
13916
13904
  overridesTypeAware = {},
13917
13905
  parserOptions = {},
@@ -13963,6 +13951,7 @@ async function typescript(options = {}) {
13963
13951
  files: files2,
13964
13952
  ...ignores2 ? { ignores: ignores2 } : {},
13965
13953
  languageOptions: {
13954
+ globals: globals2,
13966
13955
  parser: parserTs,
13967
13956
  parserOptions: {
13968
13957
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
@@ -14529,6 +14518,7 @@ function acaleph(options = {}, ...userConfigs) {
14529
14518
  typescript({
14530
14519
  ...typescriptOptions,
14531
14520
  componentExts,
14521
+ globals: globals2,
14532
14522
  overrides: getOverrides(options, "typescript"),
14533
14523
  type: options.type
14534
14524
  })
package/dist/index.d.cts CHANGED
@@ -11546,6 +11546,7 @@ interface VendoredPrettierOptionsRequired {
11546
11546
 
11547
11547
  type Awaitable<T> = T | Promise<T>;
11548
11548
  type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
11549
+ type GlobalsOptions = Record<string, 'readonly' | 'writable'>;
11549
11550
 
11550
11551
  /**
11551
11552
  * An updated version of ESLint's `Linter.Config`, which provides autocompletion
@@ -11717,6 +11718,10 @@ interface OptionsTypeScriptParserOptions {
11717
11718
  * @default ['**\/*.md\/**', '**\/*.astro/*.ts']
11718
11719
  */
11719
11720
  ignoresTypeAware?: string[];
11721
+ /**
11722
+ * @example global: {xxxx: 'readonly' | 'writable'}
11723
+ */
11724
+ globals?: GlobalsOptions;
11720
11725
  }
11721
11726
  interface OptionsTypeScriptWithTypes {
11722
11727
  /**
@@ -12023,7 +12028,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
12023
12028
  * @default true
12024
12029
  */
12025
12030
  autoRenamePlugins?: boolean;
12026
- globals?: Record<PropertyKey, any>;
12031
+ globals?: GlobalsOptions;
12027
12032
  /**
12028
12033
  * Provide overrides for rules for each integration.
12029
12034
  *
package/dist/index.d.ts CHANGED
@@ -11546,6 +11546,7 @@ interface VendoredPrettierOptionsRequired {
11546
11546
 
11547
11547
  type Awaitable<T> = T | Promise<T>;
11548
11548
  type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
11549
+ type GlobalsOptions = Record<string, 'readonly' | 'writable'>;
11549
11550
 
11550
11551
  /**
11551
11552
  * An updated version of ESLint's `Linter.Config`, which provides autocompletion
@@ -11717,6 +11718,10 @@ interface OptionsTypeScriptParserOptions {
11717
11718
  * @default ['**\/*.md\/**', '**\/*.astro/*.ts']
11718
11719
  */
11719
11720
  ignoresTypeAware?: string[];
11721
+ /**
11722
+ * @example global: {xxxx: 'readonly' | 'writable'}
11723
+ */
11724
+ globals?: GlobalsOptions;
11720
11725
  }
11721
11726
  interface OptionsTypeScriptWithTypes {
11722
11727
  /**
@@ -12023,7 +12028,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
12023
12028
  * @default true
12024
12029
  */
12025
12030
  autoRenamePlugins?: boolean;
12026
- globals?: Record<PropertyKey, any>;
12031
+ globals?: GlobalsOptions;
12027
12032
  /**
12028
12033
  * Provide overrides for rules for each integration.
12029
12034
  *
package/dist/index.js CHANGED
@@ -1103,19 +1103,6 @@ async function react(options = {}) {
1103
1103
  name: "acaleph/react/rules",
1104
1104
  rules: {
1105
1105
  ...pluginReact.configs.recommended.rules,
1106
- // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
1107
- "react-dom/no-dangerously-set-innerhtml": "warn",
1108
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1109
- "react-dom/no-find-dom-node": "error",
1110
- "react-dom/no-flush-sync": "error",
1111
- "react-dom/no-hydrate": "error",
1112
- "react-dom/no-namespace": "error",
1113
- "react-dom/no-render": "error",
1114
- "react-dom/no-render-return-value": "error",
1115
- "react-dom/no-script-url": "warn",
1116
- "react-dom/no-unsafe-iframe-sandbox": "warn",
1117
- "react-dom/no-use-form-state": "error",
1118
- "react-dom/no-void-elements-with-children": "error",
1119
1106
  "react-refresh/only-export-components": [
1120
1107
  "error",
1121
1108
  {
@@ -1631,6 +1618,7 @@ async function typescript(options = {}) {
1631
1618
  const {
1632
1619
  componentExts = [],
1633
1620
  erasableOnly = false,
1621
+ globals: globals2 = {},
1634
1622
  overrides = {},
1635
1623
  overridesTypeAware = {},
1636
1624
  parserOptions = {},
@@ -1682,6 +1670,7 @@ async function typescript(options = {}) {
1682
1670
  files: files2,
1683
1671
  ...ignores2 ? { ignores: ignores2 } : {},
1684
1672
  languageOptions: {
1673
+ globals: globals2,
1685
1674
  parser: parserTs,
1686
1675
  parserOptions: {
1687
1676
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
@@ -2248,6 +2237,7 @@ function acaleph(options = {}, ...userConfigs) {
2248
2237
  typescript({
2249
2238
  ...typescriptOptions,
2250
2239
  componentExts,
2240
+ globals: globals2,
2251
2241
  overrides: getOverrides(options, "typescript"),
2252
2242
  type: options.type
2253
2243
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "acaleph-eslint",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "packageManager": "pnpm@10.5.2",
6
6
  "description": "",
7
7
  "author": "acaleph",