-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint-config-carbon): add storybook config (#10335)
* feat(eslint-config-carbon): add storybook config * chore(config): disable title rule * chore(storybook): enable CSF3 preview * feat(eslint-config): set no-redundant-names rule to error * chore(react): update stories based on lint rules pt 1 * chore(react): update stories based on lint rules pt 2 * chore(react): update stories based on lint rules pt 3 * chore(react): update stories based on lint rules pt 4 * chore(react): add eslint-ignore for v11 story
- Loading branch information
Showing
110 changed files
with
558 additions
and
472 deletions.
There are no files selected for viewing
Binary file added
BIN
+123 KB
.yarn/cache/@typescript-eslint-experimental-utils-npm-5.9.0-e979f37bae-731b278406.zip
Binary file not shown.
Binary file added
BIN
+283 KB
.yarn/cache/@typescript-eslint-scope-manager-npm-5.9.0-576df9f165-46e7ab0cef.zip
Binary file not shown.
Binary file added
BIN
+26.3 KB
.yarn/cache/@typescript-eslint-types-npm-5.9.0-78ae7b90b4-7c4e142600.zip
Binary file not shown.
Binary file added
BIN
+123 KB
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.9.0-b94ae1d939-71e3f720e3.zip
Binary file not shown.
Binary file added
BIN
+9.12 KB
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.9.0-48c4a8bb3d-34a595b83b.zip
Binary file not shown.
Binary file added
BIN
+27.8 KB
.yarn/cache/eslint-plugin-storybook-npm-0.5.5-df0b7df3f8-97160cdda0.zip
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Copyright IBM Corp. 2018, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ESLint configuration for eslint-plugin-storybook | ||
* | ||
* @see https://github.com/storybookjs/eslint-plugin-storybook | ||
*/ | ||
module.exports = { | ||
plugins: ['storybook'], | ||
overrides: [ | ||
{ | ||
files: ['*.stories.js', '*-story.js'], | ||
extends: ['plugin:storybook/recommended'], | ||
rules: { | ||
// Interactions should be awaited | ||
'storybook/await-interactions': 'error', | ||
|
||
// Pass a context when invoking play function of another story | ||
'storybook/context-in-play-function': 'error', | ||
|
||
// The component property should be set | ||
'storybook/csf-component': 'error', | ||
|
||
// Story files should have a default export | ||
'storybook/default-exports': 'error', | ||
|
||
// Deprecated hierachy separator in title property | ||
'storybook/hierarchy-separator': 'error', | ||
|
||
'storybook/no-redundant-story-name': 'error', | ||
|
||
// storiesOf is deprecated and should not be used | ||
'storybook/no-stories-of': 'error', | ||
|
||
// Do not define a title in meta | ||
'storybook/no-title-property-in-meta': 'off', | ||
|
||
// Stories should use PascalCase | ||
'storybook/prefer-pascal-case': 'error', | ||
|
||
// A story file must contain at least one story export | ||
'storybook/story-exports': 'error', | ||
|
||
// Use expect from @storybook/jest | ||
'storybook/use-storybook-expect': 'error', | ||
|
||
// Do not use testing-library directly on stories | ||
'storybook/use-storybook-testing-library': 'error', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.