10BC0 chore: disallow use of deprecated `type` property in core rule tests … · eslint/eslint@b42c42e · GitHub
[go: up one dir, main page]

Skip to content

Commit b42c42e

Browse files
authored
chore: disallow use of deprecated type property in core rule tests (#20094)
1 parent 7bb498d commit b42c42e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

eslint.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,21 @@ module.exports = defineConfig([
163163
],
164164
"eslint-plugin/test-case-shorthand-strings": "error",
165165
"no-useless-concat": "off",
166+
"no-restricted-syntax": [
167+
"error",
168+
{
169+
selector:
170+
"ObjectExpression > Property[key.name='errors'] > ArrayExpression.value > ObjectExpression > Property[key.name='type']",
171+
message:
172+
"Do not use deprecated 'type' property in rule tests.",
173+
},
174+
],
166175
},
167176
},
168177
{
169178
name: "eslint/tests",
170179
files: ["tests/**/*.js"],
180+
ignores: ["tests/lib/rules/*.js", "tests/tools/internal-rules/*.js"],
171181
languageOptions: {
172182
globals: {
173183
...globals.mocha,

0 commit comments

Comments
 (0)
0