Skip to content

Commit

Permalink
Use the updated react eslint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuth committed Sep 23, 2024
1 parent 14af0b0 commit d3c5b6f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
2 changes: 0 additions & 2 deletions demo/src/advanced.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default {
title: 'advanced',
component: 'button',
Expand Down
2 changes: 0 additions & 2 deletions demo/src/autoTitles.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default {
component: 'button',
};
Expand Down
2 changes: 0 additions & 2 deletions demo/src/simple.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default {
title: 'simple',
component: 'button',
Expand Down
15 changes: 3 additions & 12 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const globals = require('globals');
const js = require('@eslint/js');
const prettierRecommended = require('eslint-plugin-prettier/recommended');
const reactRecommended = require('eslint-plugin-react/configs/recommended');
const react = require('eslint-plugin-react');
const typescriptEslint = require('typescript-eslint');
const vitest = require('eslint-plugin-vitest');

Expand Down Expand Up @@ -35,21 +35,12 @@ module.exports = [
},
{
files: ['demo/**/*.{js,jsx,ts,tsx}'],
...reactRecommended,
languageOptions: {
...reactRecommended.languageOptions,
globals: {
...globals.browser,
},
},
...react.configs.flat.recommended,
...react.configs.flat['jsx-runtime'],
settings: {
react: {
version: 'detect',
},
},
rules: {
...reactRecommended.rules,
'react/prop-types': 0,
},
},
];

0 comments on commit d3c5b6f

Please sign in to comment.