Skip to content

Commit

Permalink
chore: add storybook eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietNatu committed Nov 28, 2024
1 parent 81925c6 commit ff0f168
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
7 changes: 3 additions & 4 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ import sonarjs from 'eslint-plugin-sonarjs';
import jsdoc from 'eslint-plugin-jsdoc';
import jasmine from 'eslint-plugin-jasmine';
import angular from 'angular-eslint';
import storybook from 'eslint-plugin-storybook';

/* TODO: missing packages
eslint-plugin-storybook
*/
/* TODO: explore extra packages
eslint-plugin-import
*/
Expand Down Expand Up @@ -105,7 +103,7 @@ const vrtConfig = tseslint.config({
},
});

const storybookConfig = tseslint.config({
const storybookConfig = tseslint.config(...storybook.configs['flat/recommended'], {
files: ['src/**/*.stories.[jt]s?(x)'],
rules: {
'@typescript-eslint/restrict-template-expressions': 'off',
Expand Down Expand Up @@ -364,6 +362,7 @@ const defaultIgnores = [
'lighthouserc.*js',
'**/mockServiceWorker.js',
'**/.storybook/main.ts',
'!**/.storybook',
];

export default {
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-refresh": "0.4.14",
"eslint-plugin-sonarjs": "2.0.4",
"eslint-plugin-storybook": "^0.11.1",
"eslint-plugin-testing-library": "7.0.0",
"eslint-plugin-unused-imports": "4.1.4",
"globals": "15.12.0",
Expand Down
36 changes: 28 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff0f168

Please sign in to comment.