Skip to content

Commit 27ac79c

Browse files
committed
esm is cool
1 parent 2ce92bf commit 27ac79c

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

docs/rules/isolated-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prevent usage of variables from outside the scope of isolated functions
22

3-
💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#preset-configs).
3+
💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).
44

55
<!-- end auto-generated rule header -->
66
<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default [
7272
| [explicit-length-check](docs/rules/explicit-length-check.md) | Enforce explicitly comparing the `length` or `size` property of a value. || 🔧 | 💡 |
7373
| [filename-case](docs/rules/filename-case.md) | Enforce a case style for filenames. || | |
7474
| [import-style](docs/rules/import-style.md) | Enforce specific import styles per module. || | |
75+
| [isolated-functions](docs/rules/isolated-functions.md) | Prevent usage of variables from outside the scope of isolated functions. || | |
7576
| [new-for-builtins](docs/rules/new-for-builtins.md) | Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. || 🔧 | 💡 |
7677
| [no-abusive-eslint-disable](docs/rules/no-abusive-eslint-disable.md) | Enforce specifying rules to disable in `eslint-disable` comments. || | |
7778
| [no-accessor-recursion](docs/rules/no-accessor-recursion.md) | Disallow recursive access to `this` within getters and setters. || | |

rules/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {default as 'expiring-todo-comments'} from './expiring-todo-comments.js';
1616
export {default as 'explicit-length-check'} from './explicit-length-check.js';
1717
export {default as 'filename-case'} from './filename-case.js';
1818
export {default as 'import-style'} from './import-style.js';
19+
export {default as 'isolated-functions'} from './isolated-functions.js';
1920
export {default as 'new-for-builtins'} from './new-for-builtins.js';
2021
export {default as 'no-abusive-eslint-disable'} from './no-abusive-eslint-disable.js';
2122
export {default as 'no-accessor-recursion'} from './no-accessor-recursion.js';

rules/isolated-functions.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
2-
const esquery = require('esquery');
3-
const functionTypes = require('./ast/function-types.js');
2+
import esquery from 'esquery';
3+
import functionTypes from './ast/function-types.js';
44

55
const MESSAGE_ID_EXTERNALLY_SCOPED_VARIABLE = 'externally-scoped-variable';
66
const messages = {
@@ -123,13 +123,6 @@ const schema = [
123123
type: 'object',
124124
additionalProperties: false,
125125
properties: {
126-
tags: {
127-
type: 'array',
128-
uniqueItems: true,
129-
items: {
130-
type: 'string',
131-
},
132-
},
133126
globals: {
134127
oneOf: [{type: 'boolean'}, {type: 'array', items: {type: 'string'}}],
135128
},
@@ -159,7 +152,7 @@ const schema = [
159152
];
160153

161154
/** @type {import('eslint').Rule.RuleModule} */
162-
module.exports = {
155+
export default {
163156
create,
164157
meta: {
165158
type: 'problem',

0 commit comments

Comments
 (0)