eslint-plugin-putout 25.0.3 → 25.0.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/lib/index.mjs CHANGED
@@ -5,7 +5,7 @@ import json from './json.mjs';
5
5
  import html from './html.mjs';
6
6
  import ts from './ts.mjs';
7
7
  import jsxConfig, {jsx} from './jsx.mjs';
8
- import putout from './plugin.js';
8
+ import * as putout from './plugin.mjs';
9
9
 
10
10
  const n = nPlugin.configs['flat/mixed-esm-and-cjs'];
11
11
 
package/lib/json.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import stylisticJs from '@stylistic/eslint-plugin-js';
2
- import putout from './plugin.js';
2
+ import * as putout from './plugin.mjs';
3
3
 
4
4
  export default [{
5
5
  name: 'putout: json',
@@ -1,6 +1,7 @@
1
- 'use strict';
1
+ import {createRequire} from 'node:module';
2
+ import {createPlugin} from '@putout/eslint/create-plugin';
2
3
 
3
- const {createPlugin} = require('@putout/eslint/create-plugin');
4
+ const require = createRequire(import.meta.url);
4
5
 
5
6
  const getRule = (a) => ({
6
7
  [a]: require(`./${a}`),
@@ -10,7 +11,7 @@ const getWrapRule = (a) => ({
10
11
  [a]: createPlugin(require(`./${a}`)),
11
12
  });
12
13
 
13
- module.exports.rules = {
14
+ export const rules = {
14
15
  ...getWrapRule('array-element-newline'),
15
16
  ...getWrapRule('single-property-destructuring'),
16
17
  ...getWrapRule('multiple-properties-destructuring'),
package/lib/ts.mjs CHANGED
@@ -4,7 +4,7 @@ import tseslint from 'typescript-eslint';
4
4
  import tsPlugin from '@typescript-eslint/eslint-plugin';
5
5
  import stylisticTs from '@stylistic/eslint-plugin-ts';
6
6
  import {jsx} from './jsx.mjs';
7
- import plugin from './plugin.js';
7
+ import * as plugin from './plugin.mjs';
8
8
 
9
9
  const {assign} = Object;
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "25.0.3",
3
+ "version": "25.0.4",
4
4
  "type": "commonjs",
5
5
  "description": "ESLint plugin for 🐊Putout",
6
6
  "release": false,