intial
This commit is contained in:
32
node_modules/eslint-plugin-svelte/lib/rules/no-inspect.js
generated
vendored
Normal file
32
node_modules/eslint-plugin-svelte/lib/rules/no-inspect.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { createRule } from '../utils/index.js';
|
||||
export default createRule('no-inspect', {
|
||||
meta: {
|
||||
docs: {
|
||||
description: 'Warns against the use of `$inspect` directive',
|
||||
category: 'Best Practices',
|
||||
recommended: true,
|
||||
default: 'warn'
|
||||
},
|
||||
schema: [],
|
||||
messages: {
|
||||
unexpected: 'Do not use $inspect directive'
|
||||
},
|
||||
type: 'suggestion',
|
||||
conditions: [
|
||||
{
|
||||
svelteVersions: ['5'],
|
||||
runes: [true, 'undetermined']
|
||||
}
|
||||
]
|
||||
},
|
||||
create(context) {
|
||||
return {
|
||||
Identifier(node) {
|
||||
if (node.name !== '$inspect') {
|
||||
return;
|
||||
}
|
||||
context.report({ messageId: 'unexpected', node });
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user