Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add no-property-in-node rule #433

Merged
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b9d6c28
feat: add no-property-in-node rule
JoshuaKGoldberg Feb 5, 2024
8cfaf6d
Add ☑️ emoji for recommended-type-checked
JoshuaKGoldberg Feb 5, 2024
4d163e1
tests: valid before invalid
JoshuaKGoldberg Feb 5, 2024
d62539d
Also check for whether the node has a 'type'
JoshuaKGoldberg Feb 5, 2024
3575644
Added docs and example to isAstNodeType
JoshuaKGoldberg Feb 5, 2024
e42c075
Expanded rule details
JoshuaKGoldberg Feb 5, 2024
2a94dcb
Add more valid test cases
JoshuaKGoldberg Feb 5, 2024
4d5d332
Merge branch 'main'
JoshuaKGoldberg Feb 5, 2024
755cc08
Fixed test path to fixtures
JoshuaKGoldberg Feb 5, 2024
d76b08a
Use parserOptions.project: true for eslint-remote-tester on TS files
JoshuaKGoldberg Feb 5, 2024
5913127
nit: avoid shadowing name for typePart
JoshuaKGoldberg Feb 5, 2024
d45695d
<!-- omit from toc -->
JoshuaKGoldberg Feb 5, 2024
532925d
Downgraded to typescript-eslint@v5
JoshuaKGoldberg Feb 6, 2024
6b60ab0
Also remove @typescript-eslint/utils
JoshuaKGoldberg Feb 6, 2024
89aafda
Or rather, make @typescript-eslint/utils a -D
JoshuaKGoldberg Feb 6, 2024
1d570e8
Remove ts-api-utils too
JoshuaKGoldberg Feb 6, 2024
1ec0c2a
Removed recommended-type-checked
JoshuaKGoldberg Feb 6, 2024
de370b0
Removed README.md section too
JoshuaKGoldberg Feb 6, 2024
18b205a
Removed eslint-remote-tester.config.js parserOptions.project too
JoshuaKGoldberg Feb 6, 2024
8d68dc9
Redid README.md presets table
JoshuaKGoldberg Feb 6, 2024
d8dc1a0
Added all-type-checked
JoshuaKGoldberg Feb 6, 2024
d8cc468
Removed file notice
JoshuaKGoldberg Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslint-doc-generatorrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const prettier = require('prettier');

/** @type {import('eslint-doc-generator').GenerateOptions} */
module.exports = {
configEmoji: [['recommended-type-checked', '☑️']],
ignoreConfig: [
'all',
'rules',
Expand Down
118 changes: 73 additions & 45 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions configs/recommended-type-checked.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

const mod = require('../lib/index.js');

module.exports = {
plugins: { 'eslint-plugin': mod },
rules: mod.configs['recommended-type-checked'].rules,
};
2 changes: 1 addition & 1 deletion docs/rules/consistent-output.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce consistent use of `output` assertions in rule tests (`eslint-plugin/consistent-output`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/fixer-return.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require fixer functions to return a fix (`eslint-plugin/fixer-return`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-deprecated-context-methods.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow usage of deprecated methods on rule context objects (`eslint-plugin/no-deprecated-context-methods`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-deprecated-report-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow the version of `context.report()` with multiple arguments (`eslint-plugin/no-deprecated-report-api`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-identical-tests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow identical tests (`eslint-plugin/no-identical-tests`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-missing-message-ids.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow `messageId`s that are missing from `meta.messages` (`eslint-plugin/no-missing-message-ids`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-missing-placeholders.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow missing placeholders in rule report messages (`eslint-plugin/no-missing-placeholders`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-only-tests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow the test case property `only` (`eslint-plugin/no-only-tests`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).

Expand Down
58 changes: 58 additions & 0 deletions docs/rules/no-property-in-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Disallow using `in` to narrow node types instead of looking at properties (`eslint-plugin/no-property-in-node`)

💼 This rule is enabled in the ☑️ `recommended-type-checked` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).

💭 This rule requires type information.

<!-- end auto-generated rule header -->

When working with a node of type `ESTree.Node` or `TSESTree.Node`, it can be tempting to use the `'in'` operator to narrow the node's type.
`'in'` narrowing is susceptible to confusing behavior from quirks of ASTs, such as node properties sometimes being omitted from nodes and other times explicitly being set to `null` or `undefined`.

Instead, checking a node's `type` property is generally considered preferable.

## Rule Details

Examples of **incorrect** code for this rule:

```ts
/* eslint eslint-plugin/no-property-in-node: error */

/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
/* ... */
},
create(context) {
return {
'ClassDeclaration, FunctionDeclaration'(node) {
if ('superClass' in node) {
console.log('This is a class declaration:', node);
}
},
};
},
};
```

Examples of **correct** code for this rule:

```ts
/* eslint eslint-plugin/no-property-in-node: error */

/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
/* ... */
},
create(context) {
return {
'ClassDeclaration, FunctionDeclaration'(node) {
if (node.type === 'ClassDeclaration') {
console.log('This is a class declaration:', node);
}
},
};
},
};
```
2 changes: 1 addition & 1 deletion docs/rules/no-unused-message-ids.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow unused `messageId`s in `meta.messages` (`eslint-plugin/no-unused-message-ids`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-unused-placeholders.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow unused placeholders in rule report messages (`eslint-plugin/no-unused-placeholders`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-useless-token-range.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow unnecessary calls to `sourceCode.getFirstToken()` and `sourceCode.getLastToken()` (`eslint-plugin/no-useless-token-range`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-message-ids.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require using `messageId` instead of `message` or `desc` to report rule violations (`eslint-plugin/prefer-message-ids`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-object-rule.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow function-style rules (`eslint-plugin/prefer-object-rule`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-output-null.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow invalid RuleTester test cases where the `output` matches the `code` (`eslint-plugin/prefer-output-null`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-fixable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require rules to implement a `meta.fixable` property (`eslint-plugin/require-meta-fixable`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-has-suggestions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require suggestable rules to implement a `meta.hasSuggestions` property (`eslint-plugin/require-meta-has-suggestions`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require rules to implement a `meta.schema` property (`eslint-plugin/require-meta-schema`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-type.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require rules to implement a `meta.type` property (`eslint-plugin/require-meta-type`)

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets).
💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets): ✅ `recommended`, ☑️ `recommended-type-checked`.

<!-- end auto-generated rule header -->

Expand Down
3 changes: 3 additions & 0 deletions eslint-remote-tester.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ module.exports = {
{
files: ['*.ts', '*.mts', '*.cts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
},
],
},
Expand Down
4 changes: 3 additions & 1 deletion lib/index.js
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://github.com/eslint-community/eslint-plugin-eslint-plugin/actions/runs/7794182409/job/21255096639?pr=433:

Results:
Repository: eslint/eslint
Rule: eslint-plugin/no-property-in-node
Message: You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Occurred while linting /home/runner/work/eslint-plugin-eslint-plugin/eslint-plugin-eslint-plugin/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/eslint/eslint/docs/src/assets/js/focus-visible.js:41
Rule: "eslint-plugin/no-property-in-node"
Path: eslint/eslint/docs/src/assets/js/focus-visible.js
Link: https://github.com/eslint/eslint/blob/HEAD/docs/src/assets/js/focus-visible.js#L41

What would you like to do here? The first ideas that come to mind for me are:

  • Disable type-checked rules in all & add an all-type-checked config?
  • Disable no-property-in-node for specifically eslint/eslint, since it's the only one without a TSConfig?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable type-checked rules in all & add an all-type-checked config?

I slightly prefer this. just likerecommended and recommended-type-checked. @bmish wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rule is also rules-recommended? So also need rules-recommended-type-checked...., so many presets doesn't seem like a good idea.😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah 😓 ... another possibility for flat configs specifically could be to make the configs be a function with properties set on it. So you could do either of:

export default [
  eslintPlugin.configs.recommended,
  eslintPlugin.configs.recommended({ typeChecked: true }),
]

The only prior art I know of this strategy is azat-io/eslint-plugin-perfectionist#90.

Copy link
Contributor

@aladdin-add aladdin-add Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recommended config follows the eslint's semantic-versioning-policy, while all, rules-all, tests-all does not.

maybe just adding recommended: false in this PR. let's consider adding the configs in another PR. thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicating every config when we have so many is not great. What about just providing a type-checked config with just this single rule that you can mix and match with the others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, that's what we used to do in typescript-eslint. But then we found that most folks only enabled one of the configs. And it was a bit irksome to have to enable two.

typescript-eslint/typescript-eslint#5204 -> https://typescript-eslint.io/blog/announcing-typescript-eslint-v6#reworked-configuration-names is what we ended up with.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Continuing discussion in:

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const PLUGIN_NAME = packageMetadata.name.replace(/^eslint-plugin-/, '');

const configFilters = {
all: () => true,
recommended: (rule) => rule.meta.docs.recommended,
recommended: (rule) =>
rule.meta.docs.recommended && !rule.meta.docs.requiresTypeChecking,
'recommended-type-checked': (rule) => rule.meta.docs.recommended,
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
rules: (rule) => rule.meta.docs.category === 'Rules',
tests: (rule) => rule.meta.docs.category === 'Tests',
'rules-recommended': (rule) =>
Expand Down
78 changes: 78 additions & 0 deletions lib/rules/no-property-in-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
'use strict';

const { ESLintUtils } = require('@typescript-eslint/utils');

Check failure on line 3 in lib/rules/no-property-in-node.js

View workflow job for this annotation

GitHub Actions / lint

"@typescript-eslint/utils" is not found
const tsutils = require('ts-api-utils');

const typedNodeSourceFileTesters = [
/@types[/\\]estree[/\\]index\.d\.ts/,
/@typescript-eslint[/\\]types[/\\]dist[/\\]generated[/\\]ast-spec\.d\.ts/,
];

/**
* Given a TypeScript type, determines whether the type appears to be for a known
* AST type from the typings of @typescript-eslint/types or estree.
* We check based on two rough conditions:
* - The type has a 'kind' property (as AST node types all do)
* - The type is declared in one of those package's .d.ts types
*
* @example
* ```
* module.exports = {
* create(context) {
* BinaryExpression(node) {
* const type = services.getTypeAtLocation(node.right);
* // ^^^^
* // This variable's type will be TSESTree.BinaryExpression
* }
* }
* }
* ```
*
* @param {import('typescript').Type} type
* @returns Whether the type seems to include a known ESTree or TSESTree AST node.
*/
function isAstNodeType(type) {
return tsutils
.typeParts(type)
.filter((typePart) => typePart.getProperty('type'))
.flatMap((typePart) => typePart.symbol?.declarations ?? [])
.some((declaration) => {
const fileName = declaration.getSourceFile().fileName;
return (
fileName &&
typedNodeSourceFileTesters.some((tester) => tester.test(fileName))
);
});
}

/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
type: 'suggestion',
docs: {
description:
'disallow using `in` to narrow node types instead of looking at properties',
category: 'Rules',
recommended: true,
requiresTypeChecking: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-property-in-node.md',
},
schema: [],
messages: {
in: 'Prefer checking specific node properties instead of a broad `in`.',
},
},

create(context) {
return {
'BinaryExpression[operator=in]'(node) {
const services = ESLintUtils.getParserServices(context);
const type = services.getTypeAtLocation(node.right);

if (isAstNodeType(type)) {
context.report({ messageId: 'in', node });
}
},
};
},
};
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
},
"homepage": "https://github.com/eslint-community/eslint-plugin-eslint-plugin#readme",
"dependencies": {
"@typescript-eslint/utils": "^6.20.0",
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
"eslint-utils": "^3.0.0",
"estraverse": "^5.3.0"
"estraverse": "^5.3.0",
"ts-api-utils": "^1.2.0"
},
"nyc": {
"branches": 94,
Expand All @@ -55,7 +57,10 @@
"@eslint/eslintrc": "^2.0.2",
"@eslint/js": "^8.37.0",
"@release-it/conventional-changelog": "^4.3.0",
"@typescript-eslint/parser": "^5.36.2",
"@types/eslint": "^8.56.2",
"@types/estree": "^1.0.5",
"@typescript-eslint/parser": "^6.20.0",
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
"@typescript-eslint/rule-tester": "^6.20.0",
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
"chai": "^4.3.6",
"dirty-chai": "^2.0.1",
"eslint": "^8.23.0",
Expand Down
Empty file added tests/lib/fixtures/file.ts
Empty file.
5 changes: 5 additions & 0 deletions tests/lib/fixtures/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"moduleResolution": "NodeNext"
}
}
Loading
Loading