12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- "use strict";
- const constants_1 = require("../utils/constants");
- const create_storybook_rule_1 = require("../utils/create-storybook-rule");
- module.exports = (0, create_storybook_rule_1.createStorybookRule)({
- name: 'no-stories-of',
- defaultOptions: [],
- meta: {
- type: 'problem',
- docs: {
- description: 'storiesOf is deprecated and should not be used',
- categories: [constants_1.CategoryId.CSF_STRICT],
- recommended: 'error',
- },
- messages: {
- doNotUseStoriesOf: 'storiesOf is deprecated and should not be used',
- },
- schema: [],
- },
- create(context) {
-
-
-
-
-
-
-
-
- return {
- ImportSpecifier(node) {
- if (node.imported.name === 'storiesOf') {
- context.report({
- node,
- messageId: 'doNotUseStoriesOf',
- });
- }
- },
- };
- },
- });
|