@deot/dev-eslint 2.8.2 → 2.8.4

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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
5
  const pluginTs = require('@typescript-eslint/eslint-plugin');
6
6
  const parserTs = require('@typescript-eslint/parser');
@@ -11,6 +11,25 @@ const pluginMarkdown = require('eslint-plugin-markdown');
11
11
  const pluginImport = require('eslint-plugin-import');
12
12
  const pluginStylistic = require('@stylistic/eslint-plugin');
13
13
 
14
+ function _interopNamespaceDefault(e) {
15
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
16
+ if (e) {
17
+ for (const k in e) {
18
+ if (k !== 'default') {
19
+ const d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: () => e[k]
23
+ });
24
+ }
25
+ }
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
30
+
31
+ const parserTs__namespace = /*#__PURE__*/_interopNamespaceDefault(parserTs);
32
+
14
33
  const pickOptions = async (key, options) => {
15
34
  const configOptions = {
16
35
  enable: typeof options?.[key] === "boolean" ? options[key] : true,
@@ -90,7 +109,7 @@ const typescript = async (options$) => {
90
109
  {
91
110
  files: ["*.ts", "*.tsx", "*.mts", "*.cts"].map((i) => "**/" + i),
92
111
  languageOptions: {
93
- parser: parserTs,
112
+ parser: parserTs__namespace,
94
113
  parserOptions: {
95
114
  sourceType: "module"
96
115
  }
@@ -121,7 +140,14 @@ const javascript = async (options$) => {
121
140
  "no-undef": 1,
122
141
  "no-debugger": 1,
123
142
  "no-unused-vars": 1,
124
- "no-useless-escape": 0
143
+ "no-useless-escape": 0,
144
+ "prefer-const": [
145
+ 2,
146
+ {
147
+ destructuring: "all",
148
+ ignoreReadBeforeAssign: false
149
+ }
150
+ ]
125
151
  };
126
152
  return [
127
153
  {
@@ -345,4 +371,7 @@ const configure = async (options, ...userConfigs) => {
345
371
  return configs.concat(userConfigs);
346
372
  };
347
373
 
374
+ const index = configure();
375
+
348
376
  exports.configure = configure;
377
+ exports.default = index;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ESLint } from 'eslint';
2
- import type { Linter } from 'eslint';
2
+ import { Linter } from 'eslint';
3
3
 
4
4
  export declare interface ConfigOptions {
5
5
  enable?: boolean;
@@ -8,6 +8,9 @@ export declare interface ConfigOptions {
8
8
 
9
9
  export declare const configure: (options?: Options, ...userConfigs: FlatConfig[]) => Promise<FlatConfig[]>;
10
10
 
11
+ declare const _default: Promise<Linter[]>;
12
+ export default _default;
13
+
11
14
  export declare type FlatConfig = Linter.FlatConfig;
12
15
 
13
16
  export declare type Modules = 'stylistic' | 'javascript' | 'typescript' | 'markdown' | 'jsdoc' | 'vue' | 'react' | 'import';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import pluginTs from '@typescript-eslint/eslint-plugin';
2
- import parserTs from '@typescript-eslint/parser';
2
+ import * as parserTs from '@typescript-eslint/parser';
3
3
  import js from '@eslint/js';
4
4
  import globals from 'globals';
5
5
  import pluginJsdoc from 'eslint-plugin-jsdoc';
@@ -117,7 +117,14 @@ const javascript = async (options$) => {
117
117
  "no-undef": 1,
118
118
  "no-debugger": 1,
119
119
  "no-unused-vars": 1,
120
- "no-useless-escape": 0
120
+ "no-useless-escape": 0,
121
+ "prefer-const": [
122
+ 2,
123
+ {
124
+ destructuring: "all",
125
+ ignoreReadBeforeAssign: false
126
+ }
127
+ ]
121
128
  };
122
129
  return [
123
130
  {
@@ -341,4 +348,6 @@ const configure = async (options, ...userConfigs) => {
341
348
  return configs.concat(userConfigs);
342
349
  };
343
350
 
344
- export { configure };
351
+ const index = configure();
352
+
353
+ export { configure, index as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/dev-eslint",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",